Abhinav Jangda, Bobby Powers, Emery D. Berger, and Arjun Guha (University of Massachusetts Amherst)
Proc. of the 2019 USENIX Annual Technical Conference (USENIX ATC 19), Renton, Washington, Jul. 2019
[paper], [PDF], [video], [video (lightning talk)]
The PLDI’17 paper’s suite of 24 benchmarks were designed to measure polyhedral loop optimization effectivity, so are small scientific computing programs (~100 LOC), not full applications. This paper uses more representative benchmarks that are compiled with Browserix-Wasm.
Browserix implements a Unix-compatible kernel in JS with full support for processes, files, pipes, blocking I/O, and other Unix features. This paper extends Browserix as Browserix-Wasm, to compile Unix programs to Wasm without modifications.
Code generated from WebAssembly has more loads and stores than native code due to:
mov ecx, [rbx+rdx*1]; add ecx, r15d; mov [rbx+rdx*1], ecx
instead of add [rdi + rcx*4 + 4*NJ], ebx
(§5.1.1)Code generated from WebAssembly has more branches due to:
Code generated from WebAssembly has more L1 instruction cache misses due to the extra instructions from more register spills (poor register allocation) and extra branches (§6.3)