Run details:
Mozilla/5.0 (Android 9; Mobile; rv:66.0) Gecko/66.0 Firefox/66.0
Firefox Mobile 66
Android
Mobile
5 years ago
Test name Executions per second
impicit elementId 14095.0 Ops/sec
explicit getElementById 23400.3 Ops/sec
id function 24715.5 Ops/sec
id var function 24555.9 Ops/sec
id var arrow function 24630.8 Ops/sec
element var 37889.4 Ops/sec
var element in block scope 33044.1 Ops/sec
let element in block scope 32920.1 Ops/sec
const element in block scope 32902.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • impicit elementId

  • explicit getElementById

  • id function

  • id var function

  • id var arrow function

  • element var

  • var element in block scope

  • let element in block scope

  • const element in block scope


;