JavaScript engine
A JavaScript engine is a specialized software program that processes JavaScript, especially for web browsers. In 2009 Major web browser released versions that included a specialized JavaScript engine to speed up web browsing on pages with Java. However, the first engine was the SpiderMonkey engine developed at Netscape, but inherited by the Mozilla Foundation. Applications of the technology included Apple Safari 4's Nitro, and the Mozilla Firefox 3.5's TraceMonkey.
Released June 30th, 2009 Firefox 3.5 includes the optimization technique which offered "performance improvements ranging between 20 and 40 times faster in some cases"[1]
On June 2, 2008 the WebKit development team announced SquirrelFish[2] — a then new JavaScript engine]] that vastly improves Safari's speed at interpreting scripts.[3] The engine was one of the new features in Safari 4, released for developers on June 11, 2008. The final JavaScript engine was called Nitro. A public beta of Safari 4 was released on February 24, 2009.
In 2008, the Google Chrome was praised for its JavaScript performance, but other browsers with JavaScript engines soon surpassed it. Chrome's strength is its application performance and JavaScript processing speed, both of which were independently verified by multiple websites to be the fastest amongst the major browsers of its time.[4][5][6] With the advent of WebKit's Squirrelfish Extreme and Mozilla's TraceMonkey JavaScript virtual machines, Chrome's JavaScript execution performance has been found to be slower.[7][8][9][10] Google responded with the Danish developed V8 (JavaScript engine) which boosted JS performance in Google Chrome 2.
Note that JavaScript should not be confused with the Java (programming language).
Major browser JS engines:
- Rhino (JavaScript engine) (Rhino is an open source JavaScript engine . It is developed entirely in Java and managed by the Mozilla Foundation)
- SpiderMonkey (JavaScript engine) (SpiderMonkey is the code name for the first ever JavaScript engine , written by Brendan Eich at Netscape Communications)
- V8 (JavaScript engine) (The V8 JavaScript engine is an open source JavaScript engine developed by Google in Denmark and shipping with the Google Chrome)
- KDE's JavaScript engine (KJS is KDE 's ECMAScript /JavaScript engine that was originally developed for the KDE project's Konqueror web browser by Harri Porter)
- Narcissus (JavaScript engine) (Narcissus is an open source JavaScript engine . It was written by Brendan Eich , who also wrote the first JavaScript engine, SpiderMonkey)
- Tamarin (JavaScript engine)
Sunspider is a JavaScript benchmark utitlity, popular for measuring the performance of the latest JavaScript engines.
Contents |
History
Before popularized in the second browser wars in 2008-2009, the JavaScript engine (also known as JavaScript interpreter or JavaScript implementation) was known simply as ainterpreter that reads JavaScript source code and executes the script accordingly.
The first ever JavaScript engine was created by Brendan Eich at Netscape Communications Corporation, for the Netscape Navigator web browser. The engine, code named SpiderMonkey, is implemented in C. It has since been updated (in JavaScript 1.5) to conform to ECMA-262 Edition 3. The Rhino engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation in Java. Like SpiderMonkey, Rhino is ECMA-262 Edition 3 compliant.
By far, the most common host environment for JavaScript is a web browser. Web browsers typically use the public API to create "host objects" responsible for reflecting the DOM into JavaScript.
The web server is another common application of the engine. A JavaScript webserver would expose host objects representing a HTTP request and response objects, which a JavaScript program could then manipulate to dynamically generate web pages.
Implementations
JavaScript can be thought of, and is in fact a dialect of ECMAScript, whic is supported in many applications. , especially web browsers, where it is commonly called JavaScript. Dialects sometimes include extensions to the language, or to the standard library and related APIs such as the W3C-specified DOM. This means that applications written in one dialect may be incompatible with another, unless they are written to use only a common subset of supported features and APIs.
Note that there is a distinction between a dialect and an implementation. A dialect of a language is significant variation of the language, while an implementation of a language/dialect executes a program written in that dialect.
Application | Dialect and latest version | ECMAScript edition |
---|---|---|
Google Chrome, the V8 engine | JavaScript | ECMA-262, edition 3 9 |
Mozilla Firefox, the Gecko layout engine, SpiderMonkey, and Rhino 6 | JavaScript 1.8 | ECMA-262, edition 3 |
Opera | ECMAScript with some JavaScript 1.5 and JScript extensions [1] |
ECMA-262, edition 3 |
KHTML layout engine, KDE's Konqueror, and Apple's Safari7 | JavaScript 1.5 1 | ECMA-262, edition 3 5 |
Adobe Acrobat | JavaScript 1.5 1 | ECMA-262, edition 3 |
OpenLaszlo Platform | JavaScript 1.4 1 | ECMA-262, edition 3 4 |
Max/MSP | JavaScript 1.5 1 | ECMA-262, edition 3 |
ANT Galio 3 | JavaScript 1.5 1 with RMAI extensions | ECMA-262, edition 3 |
See also
References
- ^ http://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html
- ^ Garen, Geoffrey (2008-06-02). "Announcing SquirrelFish". http://webkit.org/blog/189/announcing-squirrelfish/. Retrieved on 2008-06-11.
- ^ Lipskas, Vygantas (2008-06-11). "Apple Safari 4". http://www.favbrowser.com/apple-safari-4/. Retrieved on 2008-06-11.
- ^ Speed test: Google Chrome beats Firefox, IE, Safari - Business Tech, CNET News
- ^ Big browser comparison test: Internet Explorer vs. Firefox, Opera, Safari and Chrome, PC Games Hardware
- ^ Lifehacker Speed Tests: Safari 4, Chrome 2, and More - Browsers, Lifehacker
- ^ Third Chrome beta another notch faster - News, Builder AU
- ^ Step aside, Chrome, for Squirrelfish Extreme - News, Builder AU
- ^ SquirrelFish Extreme: Fastest JavaScript Engine Yet, satine.org
- ^ Firefox counters Google's browser speed test - Business Tech, CNET News