3 ms·
The author says using arrow functions won't hurt performance, but I wonder if that means v8 knows how to optimize them? Last I checked, using any ES6 syntax ca
by fenomas 11y ago
The author says using arrow functions won't hurt performance, but I wonder if that means v8 knows how to optimize them?
Last I checked, using any ES6 syntax causes v8 to permanently deopt the containing function - even using let/const to declare an unused variable that would get removed as dead code. It'll be great once that starts changing..
- chenglou 11y agoAs of today, Babel turns arrow down to normal anonymous function, and wires up the `this` inside if there's any. So if you compile through Babel (and we'll probably keep compiling for another while) there's no overhead.
- fenomas 11y agoSure, but that's all true regardless of the Chrome update discussed in the article. That's what I was wondering about.