Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
DOM manipulation vs innerhtml
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0
Browser:
Firefox 134
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
innerHTML
304K/s
DOM manipulation
5K/s
View exact numbers
Test name
Executions per second
✓
innerHTML
304,053 Ops/sec
DOM manipulation
5,197 Ops/sec
HTML Preparation code:
<div id="root"></div>
Tests:
innerHTML
let root = document.querySelector('#root') root.innerHTML = `<div id="4/4b809ca8-b600-a286-62b6-83a6a5fc4310" style="left: 0px; top: 0px; white-space: nowrap;">0</div>`
DOM manipulation
let root = document.querySelector('#root') let itemBox = document.createElement('div') itemBox.id = "4/4b809ca8-b600-a286-62b6-83a6a5fc4310" itemBox.style = "left: 0px; top: 0px; white-space: nowrap;" itemBox.innerHTML = `0` root.appendChild(itemBox)