jQuery by id vs Document.getElementById

Comparing speed of getting element by id with jQuery vs Vanilla JS
one year ago
User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0
Test name Executions per second
jQuery 2959611.0 Ops/sec
Vanilla JS 3001142.0 Ops/sec
HTML Preparation code:
  • jQuery

  • Vanilla JS

Open this result on MeasureThat.net