Hacker News new | ask | show | jobs
by s3th 3775 days ago
There's definitely a lot of room for improvement. The V8 team has been working on finishing baseline implementations for all of ES6 before spending significant time optimizing particular features. But improvements are coming quickly! In the last few weeks, for example, ES6 rest parameters got 8-10x faster and Object.assign() is now as fast as _.assign() [0].

In general, we will focus on improving the performance of the most-used features first. Arrow functions, generators, etc. are high on the list.

[0]: https://twitter.com/addyosmani/status/699976753255751681

(Disclaimer: I'm a PM on the V8 team)

1 comments

I appreciate the information. I'm curious, in reference to the original quote, how much of the existing ES5 optimization story do you think can be leveraged (at least within V8) to bring ES6/7 on par with raw ES5 and how much needs to be greenfield optimizations?
A big difference between ES5 and ES6/7 is that the former passes through our old, highly-tuned optimizing engine Crankshaft [0] and the latter passes through our new optimizing engine TurboFan [1]. The team's expertise optimizing Crankshaft can certainly be leveraged in TurboFan, but it's not an apples-to-apples comparison. In the future, TurboFan will handle ES5 code as well.

tl;dr we're changing engines mid-flight and that has as much to do with performance differences as the ES6 features themselves.

[0]: http://blog.chromium.org/2010/12/new-crankshaft-for-v8.html [1]: http://v8project.blogspot.com/2015/07/digging-into-turbofan-...