Comparison table of Ammo.js WebAssembly and Asm.js versions
Date: 9 January 2017
Browser: Chrome 57.0.2970.0 (Official Build) dev (64-bit)
|WASM binary compile time||(130ms - 300ms)
|Example used||basic / helloworld||basic / helloworld|
Tools: Emscripten v1.37.1 (Binaryen v21)
|Tools: Emscripten v1.37.1 (Asm.js)
The reason of why WASM build can be slower than asm.js build
ammoloader.js contains a lot of code generated in emscripten. It is required file, cause it contains data that should be imported in WASM module of compiled Bullet Physics, but it also has a lot of polyfills that are also applied to that module (such as asm.js polyfill). Applying them to exports object can take additional time.
build/- Output files from Bullet Physics 3 to WASM to compilation.
vendor/- Files used in performance comparison.
!!! This is WIP. (Work in progress)
It means that work isn't finished yet. I will try to optimize
ammoloader.js as far as possible and will play more with compilation parameters, let me know if you know how to improve loading speed.
Example will be uploaded soon