jQuery by id vs Document.getElementById

Comparing speed of getting element by id with jQuery vs Vanilla JS
3 years ago
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Test name Executions per second
jQuery 652769.3 Ops/sec
Vanilla JS 2204793.0 Ops/sec
HTML Preparation code:
  • jQuery

  • Vanilla JS

Open this result on MeasureThat.net