Vanilla JS ID test vs Vanilla JS Class test vs jQuery ID Test vs jQuery Class TestFastest: Vanilla JS Class test (4.6x faster)
2,713,664 ops/sec
2,493,677 ops/sec
943,415 ops/sec
586,480 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Vanilla JS ID test | |
| Vanilla JS Class test | |
| jQuery ID Test | |
| jQuery Class Test |
| 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 |