Hello All,
We have a chrome extension written in C++ and Javascript. Recently, changes are done to make use of WebAssembly module
instead of NaCl module.
However, performance of WebAssembly
found to be slower, on an avg by 30% and despite using `-
O3`, than the NaCl's performance.
Emscripten compiler, v2.0.7, is used to prepare the .wasm. Whereas for .nexe, the C++ code is compiled using `pnacl-clang++` compiler. Later `pnacl-transalte` is used to generate the .nexe file. (x86_64 arch).
OS and Compiler details are as follows.
NaCl SDK having `Pepper 50`
Emscripten SDK version 2.0.7
Ubuntu 18.04.5 LTS
Chrome version
88.0.4324.182 (64-bit)
Processor : Intel® Core™ i5-5200U CPU @ 2.20GHz × 4
My concern is -
Right now, Emscripten only supports building 32 bit .wasm. Whereas, .nexe is 64 bit. Are the two executable right candidates for the performance comparison?
There might be differences at several places.
e.g. As mentioned in the design spec of WebAssembly, `long double` are software-emulated.
Note that, I can build 32 bit nexe. However, can't use it in 64 bit Chrome. Following error occurs in that case.
NaCl module load failed: ELF file for wrong architecture.
Regards,.
Amol