Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Firefox 123
Ubuntu
Desktop
8 months ago
Test name Executions per second
jQuery - find ~ cached. 1852631.2 Ops/sec
jQuery - find ~ without cache. 1509442.1 Ops/sec
native - global 7660368.0 Ops/sec
native - cached. 799857216.0 Ops/sec
jQuery - using context. 1538802.0 Ops/sec
jQuery - using data attributes. 612837.2 Ops/sec
jQuery init after using native DOM 815920.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • jQuery - find ~ cached.

  • jQuery - find ~ without cache.

  • native - global

  • native - cached.

  • jQuery - using context.

  • jQuery - using data attributes.

  • jQuery init after using native DOM


;