Mozilla's asm. js: using JavaScript to improve Web performance

Source: Internet
Author: User
Tags format definition

In the asm. js project, Mozilla actively promotes this JavaScript subset, aiming to improve the performance of Web applications and expand the running effect of C and C ++ applications in the Web environment.

 

According to the description in the asm. js specification, we can use asm. js as a low-level and efficient target language compiler. Mozilla's goal is to help applications written in low-level languages such as C/C ++ achieve better performance, Luke Wagner, software engineer at Mozilla, said. For itself, asm. js does not allow the existing JavaScript code to run faster, he admitted. "However, Web developers are very creative. We expect them to explore the potential of asm. js in depth, rather than focusing on using C/C ++ for application writing ." This JavaScript
The tool can compile C and C ++ applications into the asm. js format and improve the running speed.

"The core of asm. js is to achieve the desired 'best performance effect' by simplifying the format definition," said Wagner. "Various asm. js generators, including Emscripten, Mandreel, and LLJS, demonstrate their ability to achieve this goal. It can also help the JavaScript engine in the browser to simplify the active optimization capabilities of the execution process and provide predictable improvements ." The existing JavaScript engine has been able to optimize this JavaScript subset; asm. js supporters have also experienced significant improvement in execution speed through Firefox and the Chrome browser platform in a short period of time, said Wagner.

Although asm. the role of js is mainly reflected in game development. Enterprise applications can also benefit from it. Axel Rauschmayer, a JavaScript technology blogger, pointed out at the o'reilly Fluent conference in San Francisco this week. He lists the two main advantages of asm. js. "The first advantage is that you can compile existing C and C ++ code, and the ready-to-use code scale is already quite large. You can directly compile and achieve excellent running speed on the Web Platform, "Rauschmayer said. "The second advantage is that it can perform concise and effective compilation on non-JavaScript code. With its help, you can easily compile your code, so that you can achieve an ideal Running Speed while logging on to the Web platform ."

Currently, supporters of the asm. js project are planning to develop more Web APIs so that asm. js can execute compilation in background threads and save the compilation results offline. This will further improve the project's future popularity among the application developers.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.