Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Chrome 117
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
jQuery - find ~ cached. 1647191.5 Ops/sec
jQuery - find ~ without cache. 1483571.4 Ops/sec
native - global 10675203.0 Ops/sec
native - cached. 20833376.0 Ops/sec
jQuery - using context. 1410110.4 Ops/sec
jQuery - using data attributes. 1039255.4 Ops/sec
jQuery init after using native DOM 1131262.2 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


;