Saturday, March 23, 2013

Firefox Nightly Now Includes OdinMonkey, Brings JavaScript Closer To Running At Native Speeds

Mozilla_Nightly_icon_2011Browsers today are able to execute JavaScript code significantly faster than just a few years ago, but even as our web apps now look more like desktop apps, JavaScript performance is still a far cry from what you can expect from a native program written in something like C or C++. To bridge this gap, Mozilla launched the asm.js project a while back and today, this code has landed in Firefox Nightly. OdinMonkey, Firefox’s name for its asm.js optimization module, allows developers to write their code in C or C++, compile it to JavaScript using Emscripten and run it at a speed that is within 2x of native performance. Unless the project hits any roadblocks, Mozilla expects OdinMonkey to ship with the stable version of Firefox 22 in June. Asm.js is a strict subset of JavaScript that “can be used as a low-level, efficient target language for compilers.” As the asm.ja specs note, this sub-language “effectively describes a safe virtual machine for memory-unsafe languages like C or C++.” Because it is just a subset of JavaScript, this also means that the code would still run in any other browser, too – it would “just run slower in the other browsers than in Firefox,” as a Mozilla spokesperson told me earlier today. You can find all the gory technical details about how this works here and in this earlier post by Axel Rauschmayer. Mozilla will also focus on this during its sessions at the Game Developer Conference in San Francisco next week. From a users perspective, this means that you could soon see significantly better and complex games in your browser (and most game developers work with C or C++ anyway, so this is a natural fit for them) as well as generally faster web apps, assuming developers start adapting asm.js. If you want to see what a difference OdinMonkey can make, try the BananaBench benchmark or this Emscripten-compiled falling boxes demo on Firefox Nightly. In my own tests, BananaBench ran about 3x faster using the Nightly. For now, Mozilla has only enabled this feature on desktop Windows and Linux, but the organization says it will arrive for desktop OSX and the mobile version of Firefox on ARM soon. In case you are wondering where the name OdinMonkey came from, Mozilla’s Luke Warner says this death metal song was the inspiration (I sadly can’t understand a word these fine gentlemen are

Source: http://feedproxy.google.com/~r/Techcrunch/~3/rui3ITWBAvk/

Gabby Olympic Gymnast Robyn Lawley Gore Vidal mlb trade rumors Misty May And Kerri Walsh Jake Dalton London 2012 field hockey

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.