Talk:JavaScript engine/Archive 2

History of JIT
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.

The current page is simply wrong. I have tried to correct this with proper references but someone keeps undoing my edits. 72.203.80.253 (talk) 06:15, 17 February 2024 (UTC)


 * 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)


 * 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.
 * It is simply not fair to give Google the credit when they were second to launch, and worse, suppress the fact that Firefox also had a JIT BEFORE. 72.203.80.253 (talk) 23:09, 17 February 2024 (UTC)


 * 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)

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

JavaScript engines are implementations of ECMAScript. Niels.bom (talk) 12:16, 23 February 2024 (UTC)


 * 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)


 * 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)


 * 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)


 * 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)