33 ms·
The article doesn't mention the number/class of CPUs in the system used for the benchmark. It claims that 'Singlepass' compilation of clang.wasm took 2s and 'Cr
by rapidlua 6y ago
The article doesn't mention the number/class of CPUs in the system used for the benchmark. It claims that 'Singlepass' compilation of clang.wasm took 2s and 'Cranelift' took 9s.
Running the same benchmark myself in Linux on a 4CPU VirtualBox on a MacBook Pro, I see 11s and 42s respectively. For reference , V8/Node.js compiles the same file in 27s.
Compiled files were 339 MiB (Singlepass), 640 MiB (Cranelift) and 90 MiB (V8/Node.js).
Clang.wasm itself is 45 MiB.
- nine_k 6y agoA VM is not the best environment to test speed and compare it to a native environment speed. I noticed that certain operations take longer on a VM, and e.g. disk performance may differ a lot (and sometimes be faster than the host FS's!) Also, things being in the page cache can speed up the second and subsequent runs much faster.
- rapidlua 6y agoTrue, but for a cpu bound task like this VM typically causes only a 10% slowdown. You aren’t going to see an order of magnitude faster execution on real hardware. The article makes it look like compilation is almost instantaneous. It’s not. Cached artifacts are rather hefty as well. V8 fares surprisingly well given that it’s not a specialized WebAssembly runtime. Wasmer should probably watch competitors more closely.