Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2569 posts at DZone. You can read more from them at their website. View Full User Profile

Mozilla Rejects Native Code Approach of Chrome's NaCl

06.25.2010
| 11390 views |
  • submit to reddit
Today Chris Blizzard, an open source evangelist at Mozilla, pitted the Firefox JavaScript Engine against Chromium's Native Client (NaCl) technology in the same test that Google used for NaCl, according to a report by the Reg.  The Velocity conference in Santa Clara, California, is all about browser and web technology performance.  Right now, in this time of "Flash vs. HTML5," another battle might be brewing over the use of native code vs. web-only.

Google has obviously chosen to support web standards in addition to plugins like Flash (which is now embedded in Chrome) and the use of native code which harnesses modern hardware architectures (NaCl).    Mozilla, on the other hand, believes that it can eventually match NaCl's performance with its JS engine and pure web technologies.  Mozilla also refuses to bundle Flash with Firefox because they want to promote the pure-web standard approach.  Blizzard said at the conference that Mozilla is now doing things that would normally only be done in native code.  



Mozilla demonstrated their JS engine's performance using the same web photo editing app that Google used in its NaCl demo.  Mozilla ported that app to JavaScript and it achieved about 7 frampes-per-second while Google's demo ran at about 15 fps.  Blizzard said the JS demo was still pretty snappy and it came within 50% of the performance of native code.



With the Firefox 4 beta due any day now, users will get a chance to test Mozilla's new, more powerful JS engine for themselves.  The JS engine will come with an extension to TraceMonkey (which specializes in tracing) called JaegerMonkey.  This extension (based on Nitro JIT) should significantly improve performance when tracing is not possible.  Tracing involves detecting code loops and converting them into assembly code.  

Blizzard said that all of these techniques, and the technology yet to be created, should get Firefox close to native performance.