Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
getElementById as last element
6.6M/s
getElementsByClassName last element
3.8M/s

Fastest: getElementById as last element (1.7x faster)

View exact numbers
  • getElementById as last element: 6,590,023 ops/sec
  • getElementsByClassName last element: 3,777,470 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
Chrome 130 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 one year ago
Chrome 130 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 one year ago
Firefox 131 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0 one year ago
Firefox 130 Linux Benchmark.js Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0 one year ago
Firefox 130 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0 one year ago
Chrome 128 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 2 years ago
Chrome 121 Windows Benchmark.js Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 2 years ago
Chrome 120 Linux Benchmark.js Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 2 years ago