Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0
Firefox 89
Ubuntu
Desktop
3 years ago
Test name Executions per second
jQuery - find ~ cached. 171235.5 Ops/sec
jQuery - find ~ without cache. 132553.2 Ops/sec
native - global 985395.1 Ops/sec
native - cached. 259034560.0 Ops/sec
jQuery - using context. 129764.1 Ops/sec
jQuery - using data attributes. 51917.4 Ops/sec
jQuery init after using native DOM 68684.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


;