Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Mac OS X 10.15.7
Desktop
2 months ago
Test name Executions per second
replaceChild near start 1546511.4 Ops/sec
replaceChild near end 1547919.5 Ops/sec
removeChild + insertBefore near start 1130899.6 Ops/sec
removeChild + insertBefore near end 1128735.1 Ops/sec
insertBefore + removeChild near start 1167384.9 Ops/sec
insertBefore + removeChild near end 1159186.5 Ops/sec
insertBefore + removeChild near start (variant 2) 1122403.9 Ops/sec
insertBefore + removeChild near end (variant 2) 1118795.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • replaceChild near start

  • replaceChild near end

  • removeChild + insertBefore near start

  • removeChild + insertBefore near end

  • insertBefore + removeChild near start

  • insertBefore + removeChild near end

  • insertBefore + removeChild near start (variant 2)

  • insertBefore + removeChild near end (variant 2)


;