Over the weekend we published a post which detailed Javascript advancements to position the web browser as a respectable replacement for native code. Asm.js allows for C-like languages to be compiled into easily optimized script executed at near native performance on asm.js-aware browsers, but are still functional as plain Javascript otherwise. If you wish to see a presentation about asm.js and compiling native code into web code, check out an online slideshow from Alon Zakai of Mozilla.

If, on the other hand, you wish to see an example of a large application compiled for the browser: would Unreal Engine 3 suffice?

Clearly a computer hardware website would take the effort required to run a few benchmarks, and we do not disappoint. Epic Citadel was run in its benchmark mode in Firefox 20.0.1, Firefox 22.0a2, and Google Chrome; true, it was not run for long on Chrome before the tab crashed, but you cannot blame me for trying.

Each benchmark was run at full-screen 1080p "High Performance" settings on a PC with a Core i7 3770, a GeForce GTX 670, and more available RAM than the browser could possibly even allocate. The usual Firefox framerate limit was removed; they were the only tab open on the same fresh profile; the setting layout.frame_rate.precise was tested in both positions because I cannot keep up what the state of requestAnimationFrame callback delay is; and each scenario was performed twice and averaged.

Firefox 20.0.1

  • layout.frame_rate.precise true: 54.7 FPS
  • layout.frame_rate.precise false: 53.2 FPS

Firefox 22.0a2 (asm.js)

  • layout.frame_rate.precise true: 147.05 FPS
  • layout.frame_rate.precise false: 144.8 FPS

Google Chrome 26.0.1410.64

  • Crashy-crashy

For Unreal Engine 3 compiled into Javascript we notice an almost 3-fold improvement in average framerate with asm.js and the few other tweaks to rendering, Javascript, and WebGL performance between Firefox 20 and 22. I would say that is pretty enticing for developers who are considering compiling into web standards.

It is also very enticing for Epic as well. A little over a month ago, Mark Rein and Tim Sweeney of Epic were interviewed by Gamasutra about HTML5 support for Unreal Engine. Due in part to the removal of UnrealScript in favor of game code being scripted in C++, Unreal Engine 4 will support HTML5. They are working with Mozilla to make the browser a reasonable competitor to consoles; write once, run on Mac, Windows, Linux, or anywhere compatible browsers can be found. Those familiar with my past editorials know this excites me greatly.

So what do our readers think? Comment away!