console.log is slow

Adam Crockett ๐ŸŒ€ - Apr 5 '23 - - Dev Community

Im not kidding, your code might not actually be slow, take out your console logs and never benchmark with them inside the code exec, its staggeringly slow.

Edit: kudos DeChamp for this high level reporting although you should run your own tests there are plenty of ideas in the comments, enjoy!

Damn sure enough, it's pretty slow.

10000 rows.

with console
422.90000000596046
410.90000000596046
437.30000001192093

without
0.30000001192092896
0.4000000059604645
0.10000002384185791

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .