Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Windows
Desktop
one year ago
Test name Executions per second
Select Element by ID - Javascript 3380193.8 Ops/sec
Change CSS - jQuery 133872.4 Ops/sec
Change CSS - Javascript 296744.5 Ops/sec
Select Element by ID - jQuery 1328057.9 Ops/sec
Change inner text - Javascript 4270921.5 Ops/sec
Change inner text - jQuery 346581.6 Ops/sec
Get element by tag name - Javascript 3393812.2 Ops/sec
Get element by tag name - jQuery 396794.1 Ops/sec
Get element by name - Javascript 32795.9 Ops/sec
Get element by name - jQuery 25191.9 Ops/sec
Get element by existing attribute - Javascript 33279.9 Ops/sec
Get element by existing attribute - jQuery 25543.8 Ops/sec
Get element by class name - Javascript 3142186.5 Ops/sec
Get element by class name - jQuery 413158.5 Ops/sec
Select sub-element - Javascript 2004372.5 Ops/sec
Select sub-element - jQuery 715983.2 Ops/sec
Loop through elements - Javascript 233656.3 Ops/sec
Loop through elements - jQuery 26467.6 Ops/sec
Add and remove Element - Javascript 398514.7 Ops/sec
Add and remove Element - jQuery 46887.0 Ops/sec
Add and Remove Class - Javascript 312896.4 Ops/sec
Add and Remove Class - jQuery 111105.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Select Element by ID - Javascript

  • Add and remove Element - jQuery

  • Add and remove Element - Javascript

  • Loop through elements - jQuery

  • Loop through elements - Javascript

  • Select sub-element - jQuery

  • Select sub-element - Javascript

  • Get element by class name - jQuery

  • Get element by class name - Javascript

  • Get element by existing attribute - jQuery

  • Get element by existing attribute - Javascript

  • Get element by name - jQuery

  • Get element by name - Javascript

  • Get element by tag name - jQuery

  • Get element by tag name - Javascript

  • Change inner text - jQuery

  • Change inner text - Javascript

  • Select Element by ID - jQuery

  • Change CSS - Javascript

  • Change CSS - jQuery

  • Add and Remove Class - Javascript

  • Add and Remove Class - jQuery


;