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 3517388.2 Ops/sec
Change CSS - jQuery 139937.5 Ops/sec
Change CSS - Javascript 308482.9 Ops/sec
Select Element by ID - jQuery 1291434.8 Ops/sec
Change inner text - Javascript 4140129.8 Ops/sec
Change inner text - jQuery 322802.8 Ops/sec
Get element by tag name - Javascript 3476258.0 Ops/sec
Get element by tag name - jQuery 403401.4 Ops/sec
Get element by name - Javascript 35120.2 Ops/sec
Get element by name - jQuery 28943.6 Ops/sec
Get element by existing attribute - Javascript 34818.8 Ops/sec
Get element by existing attribute - jQuery 28734.2 Ops/sec
Get element by class name - Javascript 3164395.5 Ops/sec
Get element by class name - jQuery 428186.3 Ops/sec
Select sub-element - Javascript 2229497.0 Ops/sec
Select sub-element - jQuery 745733.2 Ops/sec
Loop through elements - Javascript 240838.3 Ops/sec
Loop through elements - jQuery 24608.1 Ops/sec
Add and remove Element - Javascript 391276.0 Ops/sec
Add and remove Element - jQuery 44177.3 Ops/sec
Add and Remove Class - Javascript 315659.3 Ops/sec
Add and Remove Class - jQuery 109914.8 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


;