Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 21, 2013 11:30 pm GMT

Mozillas Asm.js Gets Another Step Closer To Native Performance

aurora_rocketMozilla’s asm.jsis a strict subset of JavaScript that Firefox can run significantly faster than regular JavaScript code. Thanks to the so-called OdinMonkey module for Firefox’s built-in JavaScript engine, asm.js code was running at about 2x native speed in March and this week, the organization announced that it’s now running most benchmarks at just 1.5x slower than native or better. While Google is betting on Native Client to allow web apps to execute native compiled code in the browser, Mozilla is betting on its ability to run JavaScript at near-native speeds, too. While they approach this problem from very different angles, both Google, through Native Client, and Mozilla, through its Emscripten LLVM-to-JavaScript compiler, allow developers to write their code in C or C++ and then run it in the browser. Given that most game engines are written in C or C++, the focus for asm.js has mostly been on gaming too. Indeed, one of the first public asm.js demos Mozilla showed was Epic’s Unreal Engine 3 running natively in the browser. As Mozilla’sAlon ZakaiandRobert Nymannote in the most recent announcement, the team manged to get to 1.5x performance through a number of small, incremental changes to both asm.js and the Emscripten compiler. The team, however, also profited from some general improvements to Firefox’s JavaScript engine. Specifically,ZakaiandNyman note, the fact that Firefox has now been optimized for some floating-point operationsresulted in “substantial speedups.” Mozilla measures asm.js performance by compiling the code natively (using clang and gcc) and comparing the results to running the same code through Emscripten and asm.js. Here are the most current results: For the time being, asm.js remains a Mozilla project. While Google’s Chrome team is clearly aware of it and recently added it to its Octane benchmark, it seems unlikely that Chrome will support it natively anytime soon. It’s worth noting, though, that asm.js code will run in any current JavaScript engine – it just won’t run as fast as on Firefox.

Original Link: http://feedproxy.google.com/~r/Techcrunch/~3/6Z6F6Nv8u_Q/

Share this article:    Share on Facebook
View Full Article

Techcrunch

TechCrunch is a leading technology blog, dedicated to obsessively profiling startups, reviewing new Internet products, and breaking tech news.

More About this Source Visit Techcrunch