[論文] 好像沒有那麼快:WebAssembly vs. Native Code 程式碼效能分析

Paper: Not So Fast: Analyzing the Performance of WebAssembly vs. Native Code
Author: Abhinav Jangda, Bobby Powers, Emery D. Berger, and Arjun Guha, University of Massachusetts Amherst
Source: USENIX ATC 2019


簡介

作者們先前開發了 BROWSIX,可以讓 Unix 程式直接轉成 JavaScript 並跑在瀏覽器。BROWSIX 基本上就是把程式碼轉成 JavaScript 並且用 Browser API 來模擬 Unix System Call。此篇作者更進一步,開發 BROWSIX-WASM(fork 自 Emscripten)將程式碼轉成 WebAssembly,一來解決原本 JavaScript 效能不佳問題,同時也能可以拿來和 Native Code 在 SPEC CPU suite of Benchmark 上做效能比較。實驗結果 WebAssembly 在現代瀏覽器(Chrome & Firefox)上慢 Native Code 大約 50%,並深入探討為什麼會這樣。

整體來說我覺得是很有趣的一篇論文,整理了重點並加入一些我個人的見解。

Continue reading

Browsing Websites

Browsing Websites

The technology around us affects us profoundly - emotionally, behaviorally, and cognitively. We could easily spend an enormous span not only to watch videos online but also browse websites on the internet every day. However, have you ever thought about how the sites work and what the mechanism is inside the box?

Continue reading