4 ms·
> The querySelector method executes thousands of times slower than the other more specific methods Do you mean this literally?
by orange8 7y ago
> The querySelector method executes thousands of times slower than the other more specific methods
Do you mean this literally?
- austincheney 7y agoYes. Test it yourself on JSBench https://jsbench.github.io/ https://jsbench.github.io/
- orange8 7y agoWhy link to a blank page? It was an honest question, no need to be snarky. I'll just take that as "I've no real facts about the numbers am throwing about" answer. Thanks
- austincheney 7y agoIt’s a benchmark tool that runs in your browser. You have to supply code samples to compare to see the numbers.
- orange8 7y agoA benchmark tool. Wow! Thanks for that snarkboy, I never would have known! Again, I wasn't asking for proof or tests, or links to blank benchmark tools where I could write the tests myself. I simply asked if you meant 1000 times faster literally or figuratively as that is a HUGE and significant difference. A more civil response: "Yes, I mean literally. See https://jsperf.com/queryselectorall-vs-getelementsbytagname/164" https://jsperf.com/queryselectorall-vs-getelementsbytagname/...
- dillonmckay 7y agoChill out, dude.