Are there performance gains in using ES6 Arrow Functions?

Keep in mind there can’t be an universal answer to this question, as always with all of which is implementation dependant. So the answer may be X now or with some browsers, and may be Y in the future or with other browsers.

These provisions said, here are some data: http://incaseofstairs.com/six-speed. For now and with major browsers, the answer is rather No and there might even be performance penalties (under the above provisions).


It is the opposite. From the theoretical perspective (not specific to JavaScript), lambdas (arrow functions) are anonymous, and so they are "usually" calculated during runtime on the heap.

This means the compilers may not be able to "inline" the calls to these lambdas. This degrades the performance of lambdas compared to normal free pure functions that have a much higher chance of inlining.

Being on the heap also puts the garbage collector under pressure. See this comment from the author of TypeScript that explains why arrow functions are slower.

An example benchmark:

An arrow method is 10% and 60% slower than a class method and a free function respectively

https://jsbench.me/g4kjcq9j3s/1