Due for release in June as part of Firefox 22 OdinMonkey and asm.js optimized code may just accelerate Java to near native assembly speeds, while maintaining compatibility and portability, the holy trinity of code.
Firefox’s asm.js is a clever new standard that allows programmers to code in a new Java subset which is compiled into native assembly code by OdinMonkey. Mozilla will have a version of OdinMonkey ready for every major platform providing optimizations for each platform.
Code optimized for asm.js is still fully backwards compatible with current Java engines providing the best of both worlds, compatibility now and high speed execution once Odin is released. Sites can be rebuilt now using asm.js with full compatibility even with other non monkey compatible browsers, and once browser technology catches up the sites will accelerate. Development and improvements to OdinMonkey in the future should also provide performance improvements without the need to rebuild your code.
Firefox aren’t the only ones trying to improve Java’s speed with native assembly. OdinMonkey will be competing directly with Google’s Native Client, setting up a battle to become the technology of tomorrow’s internet.
No matter which standard wins in the long run native assembly is the next major enhancement to Java. While the performance improvements for day to day browsing can’t be underestimated the effect on web application will be immense. The fact that installed applications on our PC’s are written in native assembly has always given them a huge performance advantage. Web applications written in asm.js now have the potential of being almost as fast as these native applications.
Web based games could also enjoy the same performance enhancements. The promise of complete cross platform compatibility could now also become a reality for developers.