Enhancing Browser Physics Simulations: WebAssembly and Multithreading Strategies - Hyeonjong Nam; Eun-Jin Im (IEEE Access)
This study presents a series of optimization strategies for integrating the Bullet Physics engine into a browser-based WebAssembly (Wasm) environment, addressing the performance limitations of traditional solutions such as Ammo.js. Using techniques such as Foreign Function Interface (FFI) optimization, memory management refinement, and multithreading through Web Workers, the proposed approach achieves substantial performance improvements. The optimized Wasm binaries demonstrated up to 9.88x speedup over Ammo.js in terms of frame time and exhibited superior scalability with increasing thread counts. These findings highlight the potential of Wasm as a robust platform for high-performance browser-based physics simulations, offering significant benefits in computational efficiency and scalability.