Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
document.getElementById
28.1M/s
document.querySelector
7.1M/s
localStorage
5.8M/s
sessionStorage
5.6M/s

Fastest: document.getElementById (5.1x faster)

View exact numbers
  • document.getElementById: 28,053,196 ops/sec
  • document.querySelector: 7,071,818 ops/sec
  • localStorage: 5,804,313 ops/sec
  • sessionStorage: 5,550,960 ops/sec

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

Browser OS Engine User Agent When Created
Safari 26 Mac OS X 10.15.7 Benchmark.js Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15 2 months ago
Chrome 142 Mac OS X 10.15.7 Benchmark.js Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 6 months ago
Chrome 143 Mac OS X 10.15.7 Benchmark.js Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 7 months ago
Chrome 140 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 one year ago
Chrome 139 Mac OS X 10.15.7 Benchmark.js Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 one year ago
Chrome 136 Mac OS X 10.15.7 Benchmark.js Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 one year ago
Chrome 133 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 one year ago