5 ms·
What is the advantage of this? What does 1 more JS engine buy us?
by brianwawok 11y ago
What is the advantage of this? What does 1 more JS engine buy us?
- pookeh 11y agoBetter ES6 support.
- whatever_dude 11y agoYup https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/
- dsp1234 11y agoCompetition
- sylvinus 11y agoCompetition! Now both teams have one more incentive to innovate and we get better software in the end.
- saurik 11y agoAs far as I understand, v8 doesn't care about node, and would never think twice about doing something that breaks the entire node ecosystem if it makes Chrome slightly faster. FWIW, they aren't even "wrong": it makes sense to me. What is interesting here is not "competition" but "someone who builds a JavaScript engine wants you as a user".
- sylvinus 11y agoThat is probably true, but maybe this position stems more from the fact that they were never challenged than we think. I'm hoping some pride will be thrown into the mix and will make them care just a bit more than they currently do.
- murukesh_s 11y agoperhaps more competition? v8, though much faster than other engines when released, is still roughly twice as slow as go. while jvm (also uses JIT) is roughly twice as fast as go and reaching near native/c/c++ performance. I know it's not a fair comparison between javascript(dynamic) and java (typed), but I am sure there is still room for improvement.
- LamaOfRuin 11y agoIndependent implementations of standards.
- PeCaN 11y agoWell, Chakra is a bit ahead of V8 in ES6 implementation right now. https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/
- magicalist 11y agoActually, try it with current Chrome Canary (V8 version 4.9.355). They just hit 92% with no flags.
- zbraniecki 11y agoThat's awesome! With SpiderMonkey hitting 90%, WebKit at 81%, V8 92% and Chakra at 80%, ES6 as production target becomes realistic! I'm wondering when Android/iOS default browsers will get updates because that's going to be the one remaining blocker. (and IE11 of course... but that's just waiting for userbase to move away from it :/)
- realityking 11y agoApparently iOS 9.3 will include a bigger-than-usual Safari update. While there are no new big ES6 features mentioned in the announcement, I'm hoping for some smaller improvements.
- Klathmon 11y agoHaving more than one engine can mean that there is less of a V8 monoculture. Bugs in V8 don't become "standard" and "things that V8 is really good at" doesn't become "things that Javascript is really good at".
- Artemis2 11y agoThat's what Go does. The reference of the language is [an actual document](https://golang.org/ref/spec https://golang.org/ref/spec), not a reference implementation. There are two compilers (gc and gccgo), and this way, no edge-case of an implementation can make its way into programmers' habits, something that tends to happen a lot with JavaScript.
- jdmichal 11y agoMicrosoft was surprisingly open in this regard with C#. The C# language and the CLI bytecode are both ECMA standards (334 and 335) that could be implemented by anyone. Of course, this is with the realization that the .NET standard library gives Microsoft's C# implementation a lot of staying power.
- swang 11y agoWhat do you mean by the, "edge-case of an implementation... makes its way into programmers' habits" as something that happens a lot in javascript. Maybe I'm not understanding but I read that statement and I don't see how that applies to javascript.
- Klathmon 11y agoFor example, a try/catch in V8 triggers deoptimization for the entire function it's in, while it might not in other engines. So this leads to many developers avoiding try/catch in performance critical code. This ends up with them avoiding it in general usage, which means that now "avoiding try/catch" is considered a general purpose performance tip in javascript, even though it might only apply to one engine (and the v8 team has expressed interest in trying to stop that deopt) This might be a bad example, i'm honestly not sure how try/catch performs in other engines, i just know it deopts in V8. But the fact that i don't know if it's a javascript thing or a V8 thing speaks to my point.
- bsimpson 11y agoBefore Node was popular, I tried a command-line JS engine called Narwhal. It was built by 280 North, and as I recall, it had pluggable engines. I remember being surprised at how much faster JSCore (Safari's) felt than the others. Not being permanently coupled to a particular platform is probably a good thing for Node, and provides a healthy incentive for V8 to stay on-top of its game.