Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15
Safari 17
Linux
Desktop
2 months ago
Test name Executions per second
.attribute 4493356.0 Ops/sec
setAttribute/removeAttribute 3155453.0 Ops/sec
setAttributeNode/removeAttributeNode 2554772.8 Ops/sec
attributes.setNamedItem/attributes.removeNamedITem 2448075.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • .attribute

  • setAttribute/removeAttribute

  • setAttributeNode/removeAttributeNode

  • attributes.setNamedItem/attributes.removeNamedITem