Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.203
Chrome 115
Windows
Desktop
one year ago
Test name Executions per second
Select Element by ID - Javascript 3849500.2 Ops/sec
Add and remove Element - jQuery 113592.7 Ops/sec
Add and remove Element - Javascript 673619.6 Ops/sec
Loop through elements - jQuery 65412.9 Ops/sec
Loop through elements - Javascript 306877.0 Ops/sec
Select sub-element - jQuery 1061721.8 Ops/sec
Select sub-element - Javascript 2931245.8 Ops/sec
Get element by class name - jQuery 737518.2 Ops/sec
Get element by class name - Javascript 3649903.8 Ops/sec
Get element by existing attribute - jQuery 34178.6 Ops/sec
Get element by existing attribute - Javascript 38522.8 Ops/sec
Get element by name - jQuery 38108.9 Ops/sec
Get element by name - Javascript 39023.0 Ops/sec
Get element by tag name - jQuery 679306.3 Ops/sec
Get element by tag name - Javascript 4359433.0 Ops/sec
Change inner text - jQuery 864115.6 Ops/sec
Change inner text - Javascript 5895552.5 Ops/sec
Select Element by ID - jQuery 1603201.2 Ops/sec
Change CSS - Javascript 713256.9 Ops/sec
Change CSS - jQuery 364319.2 Ops/sec
Add and Remove Class - Javascript 477691.7 Ops/sec
Add and Remove Class - jQuery 204418.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Select Element by ID - Javascript

  • Change CSS - jQuery

  • Change CSS - Javascript

  • Select Element by ID - jQuery

  • Change inner text - Javascript

  • Change inner text - jQuery

  • Get element by tag name - Javascript

  • Get element by tag name - jQuery

  • Get element by name - Javascript

  • Get element by name - jQuery

  • Get element by existing attribute - Javascript

  • Get element by existing attribute - jQuery

  • Get element by class name - Javascript

  • Get element by class name - jQuery

  • Select sub-element - Javascript

  • Select sub-element - jQuery

  • Loop through elements - Javascript

  • Loop through elements - jQuery

  • Add and remove Element - Javascript

  • Add and remove Element - jQuery

  • Add and Remove Class - Javascript

  • Add and Remove Class - jQuery