Run details:
Mozilla/5.0 (Windows NT 5.1; rv:68.0) Gecko/20100101 Goanna/4.8 Firefox/68.0 Mypal/29.1.0
Firefox 68
Windows XP
Desktop
3 years ago
Test name Executions per second
.attribute 255946.2 Ops/sec
setAttribute/removeAttribute 207927.1 Ops/sec
setAttributeNode/removeAttributeNode 174407.3 Ops/sec
attributes.setNamedItem/attributes.removeNamedITem 182310.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • .attribute

  • setAttribute/removeAttribute

  • setAttributeNode/removeAttributeNode

  • attributes.setNamedItem/attributes.removeNamedITem