Run details:
Mozilla/5.0 (X11; CrOS x86_64 13020.87.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36
Chrome 83
Chrome OS 13020.87.0
Desktop
4 years ago
Test name Executions per second
Vanilla getElementById(id) 3726261.5 Ops/sec
Vanilla querySelector(#id) 2383370.2 Ops/sec
Vanilla querySelectorAll(#id) 1010315.4 Ops/sec
jQuery(#id) 1291836.2 Ops/sec
HTML Preparation code:
Tests:
  • Vanilla getElementById(id)

  • Vanilla querySelector(#id)

  • Vanilla querySelectorAll(#id)

  • jQuery(#id)