2 min read
Note: All images and graphs are taken from the Unity Blog.
For running the tests, the team rebuilt the Benchmark project with Unity 2018.2.5f1 using the following Unity WebGL Player Settings:
Here are the findings from the report.
Criteria 1: Total amount of time taken to get to the main screen for both WebAssembly and asm.js.
- Firefox is comparatively fast to load on both Windows and macOS
- Chrome and Edge load faster when using WebAssembly
- All browsers, except Safari, load faster with WebAssembly compared to asm.js.
Criteria 2: In-Depth Load Times for WebAssembly-only.
The team compared four factors:
- WebAssembly compilation and instantiation.
- Unity engine initialization and first scene load.
- Time it takes to render first frame.
- Time it takes to load and have a stable frame-rate.
- Firefox is the fastest overall on both Windows and Mac
- Edge compiles Wasm quickly (even faster than Firefox) but is slower in Unity engine initialization.
Criteria 3: Performance and Load times for Real-World Projects
Real-world projects result in larger builds which impact the end-user’s experience. Here is an overview of total scores using WebAssembly and asm.js
- All browsers perform better when using WebAssembly
- On Windows, all browsers perform similarly
- On macOS, Firefox outperforms all other browsers.
- Safari is the browser that benefits the most by WebAssembly since it doesn’t support asm.js optimizations.
The report findings conclude that modern browsers load faster and perform better thanks to WebAssembly. It also provides more consistent user experience as compared to asm.js.
Read more about the findings on the Unity Blog.