Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.115 Safari/537.36 OPR/88.0.4412.65
Opera 88
Windows
Desktop
11 months ago
Test name Executions per second
.attribute 1700036.2 Ops/sec
setAttribute/removeAttribute 1472753.1 Ops/sec
setAttributeNode/removeAttributeNode 1121076.6 Ops/sec
attributes.setNamedItem/attributes.removeNamedITem 963744.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • .attribute

  • setAttribute/removeAttribute

  • setAttributeNode/removeAttributeNode

  • attributes.setNamedItem/attributes.removeNamedITem