Forgot your password?
typodupeerror
Programming

+ - JavaScript Assembly Language ->

Submitted by mikejuk
mikejuk (1801200) writes "The idea of using JavaScript as a modern day assembly language for browser code is being taken very seriously by Mozilla. Asm.js is a specification for a high performance JavaScript assembly language and OdinMonkey is an engine that runs it really fast. It is a detailed specification for a subset of JavaScript. Notice that while this means that this isn't a new language there are new features which would be ignored by a standard JavaScript engine. For example, the language only has strictly-typed integers, floats, arithmetic, function calls, and heap accesses. This is achieved using annotations in the form of comments and a restricted set of operations which only work with the data type — for example logical operators convert numeric values to int32.

The fact that asm.js is a subset of JavaScript means that you can take an asm.js program and run it in a standard unmodified browser or JavaScript engine. However, to get any real value from using it you need it to be run using an optimizing JavaScript engine. This is the second half of the project. Mozilla is working on OdinMonkey, a JavaScript engine that recognizes when it has been fed an asm.js program and can apply automatic optimizations.
At the moment asm.js runs no worse than half the speed of native code. So who needs NaCL or PNaCL — JavaScript might be all we need."

Link to Original Source
This discussion was created for logged-in users only, but now has been archived. No new comments can be posted.

JavaScript Assembly Language

Comments Filter:

Hackers of the world, unite!

Working...