2 min read

Unity has released a benchmarking report after two years since the last  Unity Benchmark report comparing the performance and load times of WebAssembly with asm.js. They have compared the performance of Unity WebGL in four major web browsers: Firefox 61, Chrome 70, Safari 11.1.2 and Edge 17.  Last month, Unity officially announced that it is finally making the switch to WebAssembly as their output format for the Unity WebGL build target.

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:

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.

Findings:

  • 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.

Findings:

  • 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

Findings:

  • 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.

Conclusion

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.

Read Next

Unity releases ML-Agents toolkit v0.5 with Gym interface, a new suite of learning environments.

Key Takeaways from the Unity Game Studio Report 2018.

Unity switches to WebAssembly as the output format for the Unity WebGL build target.

 


Subscribe to the weekly Packt Hub newsletter. We'll send you the results of our AI Now Survey, featuring data and insights from across the tech landscape.

* indicates required