Ask HN: What are the hidden performance tricks for JavaScript?
https://news.ycombinator.com/item?id=39579481I am currently working on a heavy JS-based tool where every millisecond counts. I've been searching for lesser-known JavaScript performance tricks that go beyond typical optimizations like using web workers or removing unused code. It feels like uncovering hidden knowledge.
One discovery I've made is that using new Array is significantly faster than Array.from or push()[0].
Could you share any similar insights or lesser-known performance optimizations you've come across?
[0] https://www.measurethat.net/Benchmarks/ShowResult/506720