Nicolas Charpentier
1 min readFeb 21, 2018

--

Thanks for bringing this up Matthew.

Here’s the code that I used to test this: https://jsperf.com/arrow-function-vs-bound-function-with-100-instances.

With this code, it looks still accurate on Chrome, but since Firefox 57 arrow functions are *equals*. Let me know if it’s not accurate.

Thanks for the comments, I agree with you that bound functions or arrow functions don’t really matter in term of performance, we’re still talking about minor diff in Op/s.. Where I’m afraid it’s if arrow functions as class methods spread as the default methods definition everywhere (React or not) where bind is irrelevant and a usual class method should be perfectly fine. It could be misleading for JavaScript newcomer.

--

--

Nicolas Charpentier

Software Engineer working with JavaScript, React, React Native, Redux, and Continuous Integration.