Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Windows
Desktop
one year ago
Benchmark.js
native - cached.
7.0M/s
native - global
6.0M/s
jQuery - find ~ cached.
798K/s
jQuery - find ~ without cache.
746K/s
jQuery - using context.
683K/s
jQuery init after using native DOM
604K/s
jQuery - using data attributes.
576K/s
View exact numbers
Test name Executions per second
native - cached. 6,986,882 Ops/sec
native - global 5,962,228 Ops/sec
jQuery - find ~ cached. 797,734 Ops/sec
jQuery - find ~ without cache. 746,479 Ops/sec
jQuery - using context. 682,581 Ops/sec
jQuery init after using native DOM 603,739 Ops/sec
jQuery - using data attributes. 576,066 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: