Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0
Firefox 120
Windows
Desktop
one year ago
Test name Executions per second
Class 116637.5 Ops/sec
ID 117385.4 Ops/sec
data attribute 125125.9 Ops/sec
getElementById 5354336.5 Ops/sec
getElementsByClassName 3385920.2 Ops/sec
HTML Preparation code:
Tests:
  • Class

  • ID

  • data attribute

  • getElementById

  • getElementsByClassName


;