4 ms·
> but rather the DOM that makes it so the perception of JavaScript is that the language/runtime is slow. Not sure what you mean by this. Every time I run somet
by bob1029 4y ago
> but rather the DOM that makes it so the perception of JavaScript is that the language/runtime is slow.
Not sure what you mean by this. Every time I run something like document.getElementById(), it is very fast.
- Kiro 4y agoIs this supposed to be a joke? If not, that's not how you measure performance. Try doing it a million times a second and use actual performance metrics instead of your eyes (which can't tell the difference between 1 nanosecond and 100 milliseconds, so completely useless for determining whether something is slow/fast). Even then just getting the element is clearly not the DOM operations that people are referring to when they say that the DOM is slow.