Mozilla brings near-native application performance to the web with asm.js

Jesse

Posts: 358   +42

Mozilla has developed a version of JavaScript called asm.js that they claim will offer performance near that of native code, which will allow a web browser to run almost any application, reports Ars Technica.

Historically, JavaScript has been inefficient when compared to languages like C and C++, which offer high performance after a program is compiled, but limit flexibility because classes cannot be changed thereafter. Conversely, JavaScript is a just-in-time (JIT) compilation language that gets compiled more or less on the fly by the CPU, which allows for much greater application flexibility, but generally lower performance. Fundamentally, JavaScript isn’t designed for high performance optimization.

Alternatives to JavaScript have cropped up in recent years, such as Google’s Dart, which avoid some of the pitfalls of JavaScript while enhancing performance. But, due to the popularity and ubiquity of JavaScript, it’s not going anywhere anytime soon. So, Mozilla set out to do something about these inherent performance limitations via asm.js.

asm.js is a derivative of JavaScript, containing a pared down and very limited subset of the language. For example, Mozilla removed JavaScript’s object-oriented constructs, which consequently removes many of JavaScript’s dynamic features that are difficult to optimize. Object-oriented functionalities such as objects and classes are not completely eliminated when using asm.js, but “they must be implemented and used by asm.js programs in the same way that C++ compilers implement and use them,” explains Ars’s Peter Bright.

mozilla web javascript performance asm.js

So what does all of this mean for the future of the web? Presently, it’s often necessary for software developers to code and compile applications for specific platforms, as browsers are simply incapable of running them. This further decreases the flexibility of applications by limiting them to one operating system, or requiring the developer to write and compile the software for multiple systems, which greatly increases overhead. One alternative is to use a language like Java, which is platform independent, but still requires installation of a local runtime environment.

With the advent of asm.js, large-scale and robust applications may be able to operate efficiently enough to run from within a browser, offering platform independence, and extremely flexible software deployment.

Graph image credit: Ars Technica.

Permalink to story.

 
This is like how old news? A month? Or two? Also the asm.js repository on GitHub was created half a year ago.
 
There are so many codes now, I don't even know. In my college I want to take Java, but I not require for my major, but Professor Murphy said is the most widely used code. I told him to recommend me a java book but he couldn't. Maybe some one here can.

In regards to this post I say if it makes things easier I say all the better.
 
I admit it is old, but back in the day all I would ever read is techspot. So at least you guys are appealing to those who don't have lots of sources for info. So thanks (even though my comments get deleted very often :mad: )
 
There are so many codes now, I don't even know. In my college I want to take Java, but I not require for my major, but Professor Murphy said is the most widely used code. I told him to recommend me a java book but he couldn't. Maybe some one here can.

In regards to this post I say if it makes things easier I say all the better.

This is Javascript not Java. If you want a java book then be prepared to read HUGE books (1 is usually not enough).

w3schools is a good place to start looking for JS tutorials. As for Java there are a lot of websites that have good tutorials.
 
Littleczr - check out KhanAcademy.org - the future of education. Everything is free and it shows u how to code in videos and then u get to use that knowledge with built-in IDE On their site. Check it out - it got me thru A levels !!
 
Yeah, I'm not a programmer or anything so this is new news to me! Way to go Firefox! :-D

But if it is so old, why is it not being used?
 
Now I see what's happening the word "JavaScript" is being auto corrected to "Java" "Script". sorry about that Puiu.
 
I find this good news. I never really got on the classes, methods, etc. bandwagon as I learned programming in the 1980s before this existed. I always wondered why it got so blessed complicated like it did. It's like little cliques of programmers exist and you can't even approach a job without 30 years of experience. Ironically, consultants in my day said they had 30 years experience and programming had only been around for 5 years. I really just installed oses and packages as the money was better except in very high end programming. Helped out applications programmers too. I only hope this appeals more to american college graduates starting out.
 
Good to see new comings in Javascript but still javascript and its derivatives is very popular among coders.
 
Back