This is the talk page for discussing improvements to the JavaScript engine article. This is not a forum for general discussion of the article's subject.
This article is within the scope of WikiProject JavaScript, a collaborative effort to improve the coverage of articles related to JavaScript, and to the development of user scripts for use on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.JavaScriptWikipedia:WikiProject JavaScriptTemplate:WikiProject JavaScriptJavaScript articles
This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.ComputingWikipedia:WikiProject ComputingTemplate:WikiProject ComputingComputing articles
This article is within the scope of WikiProject Internet, a collaborative effort to improve the coverage of the Internet on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.InternetWikipedia:WikiProject InternetTemplate:WikiProject InternetInternet articles
This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.Computer scienceWikipedia:WikiProject Computer scienceTemplate:WikiProject Computer scienceComputer science articles
This article is substantially duplicated by a piece in an external publication. Please do not flag this article as a copyright violation of the following source:
Miller, F. P., Vandome, A. F., & McBrewster, J. (2010), JavaScript: JavaScript syntax, client-side JavaScript, JavaScript engine, Ajax (programming), Web interoperability, web accessibility, cross-site scripting, cross-site request forgery, ECMAScript, dynamic HTML, Alphascript Publishing{{citation}}: CS1 maint: multiple names: authors list (link)
The article is currently wrong in that it claims Google Chrome pioneered JIT. In fact, the TraceMonkey JIT for Firefox appeared as a Beta before Chrome was even announced, and became standard in Firefox at about the same time that the Chrome came out of Beta.
Perhaps the V8 team could claim priority here, since they independently developed it for a few years prior to Chrome's release in 2008. There's another problem with your claim of Eich/TraceMonkey being the first to have JIT: In terms of widespread, non-beta deployment Chrome was well ahead of Firefox, which is supported by Mozilla's "Are we fast yet?" website and another reference in the article. (And I personally remember Firefox being noticeably slower than Chrome for JS back in those early years of Chrome.)
Anyhow, I don't think it really matters who gets credited for "the pioneer" of JIT in a JS engine. So I'm reverting back to my edit of yesterday where this point is not even mentioned. (It still has the same Eich blog ref anyways.) -Pmffl (talk) 19:56, 17 February 2024 (UTC)[reply]
Well, it does matter because that is the published history. TraceMonkey in Firefox actually goes back to 2006 also, with the publication being Gal, A., Franz, M., & Probst, C. (2006). HotpathVM: An Effective JIT for Resource-constrained Devices. In 2nd International Conference on Virtual Execution Environments (VEE 2006). This made it into Firefox before anyone outside of Google even knew that Chrome was being developed. So the current article is not honest about who did what and almost looks like a hidden advertisement for Google.
In fact, as the cited Brendan Eich blog shows, TraceMonkey led to a 700 percent (!) speedup over all previously existing browsers at the time. And Chrome and Firefox often traded places in the speed race in the years that followed.
I just added info that Mozilla was working on JIT at the time. But you can't claim JS performance parity of regular 2009 Firefox and Chrome; the refs in the paragraph show that V8 was clearly faster. Fact is, Mozilla caught up to V8 a few years later. -Pmffl (talk) 02:47, 18 February 2024 (UTC)[reply]
Use the term "implementation"
AFAIK JavaScript engines are in fact implementations of the ECMAScript standard. I'm not sure why they are called "engines" in the JavaScript ecosystem but all/most of them have as their main/sole function to execute JavaScript code.
My suggestion is to remove this potential confusion and apparent distinction and at least add something like
I disagree with saying that JS engines are only implementations of the ES standard; the major ones now run WebAssembly too, which is standardized independently of ES. -Pmffl (talk) 19:29, 23 February 2024 (UTC)[reply]
Ah yes, I see here "V8 implements ECMAScript and WebAssembly". What do you say of the following?
"JavaScript engines are implementations of the ECMAScript standard. Some JavaScript engines also implement other language standards."
Or maybe something like:
"JavaScript engines contain implementations of the ECMAScript standard. Some JavaScript engines also contain implementations of other language standards."
Or:
"JavaScript engines often consist of an implementation of the ECMAScript standard. They may also contain implementations of other language standards."
The main thing I want to prevent by rewording it is people thinking JavaScript engines are more than language implementations, which they're not (afaik). Niels.bom (talk) 16:40, 28 February 2024 (UTC)[reply]
I don't see how people would think of these engines as more than language implementations. The current opening paragraph states: "A JavaScript engine is a software component that executes JavaScript code. The first JavaScript engines were mere interpreters, but all relevant modern engines use just-in-time compilation for improved performance."
The words "component", "interpreter", "compilation" all imply implementation. I prefer to state it as a "component" up-front, because that emphasizes the engine is part of a larger system (a browser or a runtime). So I prefer to keep the lede the way it is. -Pmffl (talk) 15:14, 29 February 2024 (UTC)[reply]
I do agree that 'implementation' is the appropriate term in the context of the ES standard, so I made that specific change in the lede. -Pmffl (talk) 17:42, 3 March 2024 (UTC)[reply]