Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:131.0) Gecko/20100101 Firefox/131.0
Firefox 131
Mac OS X 10.15
Desktop
2 months ago
Test name Executions per second
.attribute 4976920.5 Ops/sec
setAttribute/removeAttribute 4129906.8 Ops/sec
setAttributeNode/removeAttributeNode 3677009.8 Ops/sec
attributes.setNamedItem/attributes.removeNamedITem 3209563.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • .attribute

  • setAttribute/removeAttribute

  • setAttributeNode/removeAttributeNode

  • attributes.setNamedItem/attributes.removeNamedITem