HTML Preparation code:
Tests:

Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
Vanilla JS Class test
2.7M/s
Vanilla JS ID test
2.5M/s
jQuery ID Test
943K/s
jQuery Class Test
586K/s

Fastest: Vanilla JS Class test (4.6x faster)

View exact numbers
  • Vanilla JS Class test: 2,713,664 ops/sec
  • Vanilla JS ID test: 2,493,677 ops/sec
  • jQuery ID Test: 943,415 ops/sec
  • jQuery Class Test: 586,480 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Vanilla JS ID test
    Vanilla JS Class test
    jQuery ID Test
    jQuery Class Test

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
Firefox 140 on Windows
View result in a separate tab
Vanilla JS ID test
5.6M/s
Vanilla JS Class test
5.4M/s
jQuery ID Test
4.7M/s
jQuery Class Test
2.3M/s
View exact numbers
Test name Executions per second
Vanilla JS ID test 5,647,026 Ops/sec
Vanilla JS Class test 5,368,334 Ops/sec
jQuery ID Test 4,736,510 Ops/sec
jQuery Class Test 2,254,786 Ops/sec