Re:Arrow Functions Coming to Chrome 45
by fenomas on Monday June 22, 2015 @02:49PM
(#9760377)
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..
Re:Arrow Functions Coming to Chrome 45
by chenglou on Monday June 22, 2015 @06:03PM
(#9761509)
As 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.
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..