Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Windows
Desktop
one year ago
Test name Executions per second
parentElement 7169131.5 Ops/sec
closest tag 9844474.0 Ops/sec
closest class 9441817.0 Ops/sec
closest tag class 8739685.0 Ops/sec
parentNode 12046876.0 Ops/sec
closestParentNode 6940131.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • parentElement

  • closest tag

  • closest class

  • closest tag class

  • parentNode

  • closestParentNode