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 3439007.8 Ops/sec
Change CSS - jQuery 142317.5 Ops/sec
Change CSS - Javascript 326393.9 Ops/sec
Select Element by ID - jQuery 1219257.4 Ops/sec
Change inner text - Javascript 4270821.5 Ops/sec
Change inner text - jQuery 392995.0 Ops/sec
Get element by tag name - Javascript 3517349.8 Ops/sec
Get element by tag name - jQuery 409421.8 Ops/sec
Get element by name - Javascript 35749.2 Ops/sec
Get element by name - jQuery 29308.0 Ops/sec
Get element by existing attribute - Javascript 35025.1 Ops/sec
Get element by existing attribute - jQuery 29397.7 Ops/sec
Get element by class name - Javascript 3224014.8 Ops/sec
Get element by class name - jQuery 422834.8 Ops/sec
Select sub-element - Javascript 2254161.2 Ops/sec
Select sub-element - jQuery 722778.2 Ops/sec
Loop through elements - Javascript 246093.1 Ops/sec
Loop through elements - jQuery 30523.3 Ops/sec
Add and remove Element - Javascript 474150.8 Ops/sec
Add and remove Element - jQuery 49511.2 Ops/sec
Add and Remove Class - Javascript 343903.0 Ops/sec
Add and Remove Class - jQuery 119069.1 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


;