Is arrow functions performance slower than simple function? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is arrow functions performance slower than simple function?

8th Jun 2021, 8:04 PM
Zhomart Suleymen
Zhomart Suleymen - avatar
2 Answers
+ 2
Jerry Hobby maybe the 'javascript' tag was not here when you answered or you did not notice it? Zhomart Suleymen no, they are not slower than regular functions... even if there was some difference between speed, there's nothing to affirm in favor on wich (all the more that would depend on browser js engine), and this difference would be negligible ;)
8th Jun 2021, 8:58 PM
visph
visph - avatar
+ 2
I assume you mean pointers to functions as opposed to direct function calls. No, they are the same speed. It's only a couple cpu cycles to resolve the pointer. It's an immesurable difference to performance.
8th Jun 2021, 8:40 PM
Jerry Hobby
Jerry Hobby - avatar