Mozilla's latest benchmark shows a significant improvement in the performance of asm.js over figures released earlier this year. At that point asm.js was delivering performance closer to 2x slower than native.
One change that led to "substantial speedups" in the performance of asm.js was introducing support in Firefox for carrying out floating-point operations using 32-bit floats rather than 64-bit doubles, which allowed Mozilla to add the float32 format to asm.js' type system.
Mozilla points out of the peformance natively compiled code is not based on a single measure but a range, with different native compilers - in the case of this benchmark the C compilers clang and gcc - delivering code of differing performance.
"What this shows is that "native speed" is not a single number, but a range. It looks like asm.js on Firefox is very close to that range – that is, while it's on average slower than clang and gcc, the amount it is slower by is not far off from how much native compilers differ amongst themselves," Mozilla researcher Alon Zakai said in a blog post.
While asm.js has Mozilla's backing, other major browser makers are looking to other technologies for improving the performance and/or maintainability of browser code, Google with NaCl and Dart, and Microsoft with TypeScript.
Zakai said there is plenty of scope to continue improving asm.js' performance.