Live data from Hacker News

An update on strong mode

groups.google.com

21–22 of 22 posts

Re: An update on strong mode

#21
post #12

Earlier quoted context omitted.

Last time I checked, fat arrow functions have a performance penalty because of all the optimisations that's made around scope in regular ES5 functions can't be used. I believe ES6 fat arrow functions are slow for a similar reasons as why regular functions are slow when you use the magic arguments variable.

Regarding the scope optimizations: that's an interesting point. I wonder if the different scoping of let / const also create a performance penalty versus var .

This is true as well.

Re: An update on strong mode

#22
post #16
post #14

Earlier quoted context omitted.

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 t…

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-...

Post reply on HN