Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Chrome 117
Windows
Desktop
one year ago
Test name Executions per second
Select Element by ID - Javascript 7698716.0 Ops/sec
Add and remove Element - jQuery 231435.0 Ops/sec
Add and remove Element - Javascript 1406137.4 Ops/sec
Loop through elements - jQuery 132385.7 Ops/sec
Loop through elements - Javascript 690183.0 Ops/sec
Select sub-element - jQuery 2379497.5 Ops/sec
Select sub-element - Javascript 5964672.5 Ops/sec
Get element by class name - jQuery 1532430.6 Ops/sec
Get element by class name - Javascript 8647202.0 Ops/sec
Get element by existing attribute - jQuery 61386.5 Ops/sec
Get element by existing attribute - Javascript 73063.4 Ops/sec
Get element by name - jQuery 65588.2 Ops/sec
Get element by name - Javascript 69098.4 Ops/sec
Get element by tag name - jQuery 1346905.6 Ops/sec
Get element by tag name - Javascript 9976482.0 Ops/sec
Change inner text - jQuery 1602188.2 Ops/sec
Change inner text - Javascript 13600403.0 Ops/sec
Select Element by ID - jQuery 3398489.2 Ops/sec
Change CSS - Javascript 1790178.6 Ops/sec
Change CSS - jQuery 828051.6 Ops/sec
Add and Remove Class - Javascript 866856.8 Ops/sec
Add and Remove Class - jQuery 361844.1 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