jQuery by id vs Document.getElementById

Comparing speed of getting element by id with jQuery vs Vanilla JS
2020 years ago
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0
Test name Executions per second
jQuery 1411155.0 Ops/sec
Vanilla JS 1926100.0 Ops/sec
HTML Preparation code:
  • jQuery

  • Vanilla JS

Open this result on MeasureThat.net