引用nn3 · 2020-12
“WebAsm is not performance competitive:”
引用它说明 WebAssembly 性能不及原生代码
大规模实测 WebAssembly 比原生代码平均慢 45%–55%。
此前研究只用约 100 行的科学计算小内核,报告 WebAssembly 平均仅比原生慢约 10%。作者构建 Browsix-Wasm,使未修改的 Unix 程序能在浏览器中运行,并在 SPEC CPU 基准上做了首次大规模评测:WebAssembly 平均慢 45%(Firefox)到 55%(Chrome),峰值慢 2.08 倍和 2.5 倍。论文还分析了性能下降的原因,其中有的来自缺失的优化和代码生成问题,有的是 WebAssembly 平台固有的。
评论者用它来说明 WebAssembly 与原生代码仍有明显性能差距(约慢 1.5 倍),也有人指出论文较早,应当在新的运行时上重跑基准。
“WebAsm is not performance competitive:”
“Given that this paper is from so long ago, running new benchmarks on existing runtimes would be productive.”