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 4126580.2 Ops/sec
Add and remove Element - jQuery 114429.0 Ops/sec
Add and remove Element - Javascript 683568.4 Ops/sec
Loop through elements - jQuery 68162.6 Ops/sec
Loop through elements - Javascript 320533.6 Ops/sec
Select sub-element - jQuery 1074775.2 Ops/sec
Select sub-element - Javascript 2594693.2 Ops/sec
Get element by class name - jQuery 775327.1 Ops/sec
Get element by class name - Javascript 3871455.0 Ops/sec
Get element by existing attribute - jQuery 39969.1 Ops/sec
Get element by existing attribute - Javascript 41142.1 Ops/sec
Get element by name - jQuery 38222.3 Ops/sec
Get element by name - Javascript 41750.5 Ops/sec
Get element by tag name - jQuery 685132.2 Ops/sec
Get element by tag name - Javascript 3933679.2 Ops/sec
Change inner text - jQuery 816687.6 Ops/sec
Change inner text - Javascript 5585899.0 Ops/sec
Select Element by ID - jQuery 1716260.1 Ops/sec
Change CSS - Javascript 686665.1 Ops/sec
Change CSS - jQuery 354240.6 Ops/sec
Add and Remove Class - Javascript 475434.8 Ops/sec
Add and Remove Class - jQuery 203746.3 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