Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
Chrome 89
Linux
Desktop
3 years ago
Test name Executions per second
jQuery - find ~ cached. 404115.0 Ops/sec
jQuery - find ~ without cache. 197351.1 Ops/sec
native - global 1766474.6 Ops/sec
native - cached. 3639763.0 Ops/sec
jQuery - using context. 183750.8 Ops/sec
jQuery - using data attributes. 136406.9 Ops/sec
jQuery init after using native DOM 207604.1 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


;