Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
innerHTML vs insertAdjacentHTML vs appendChild vs insertAdjacentElement22
innerHTML vs insertAdjacentHTML vs appendChild vs insertAdjacentElement
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Browser:
Firefox 136
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
1) innerHTML +=
9288739.0 Ops/sec
2) insertAdjacentHTML
1078376.0 Ops/sec
3) appendChild
1514264.9 Ops/sec
4) insertAdjacentElement
1393279.0 Ops/sec
Script Preparation code:
box1 = document.createElement("div"); box2 = document.createElement("div"); box2HTML = box2.innerHTML;
Tests:
1) innerHTML +=
box1.innerHTML += box2HTML;
2) insertAdjacentHTML
box1.insertAdjacentHTML('beforeend', box2HTML);
3) appendChild
box1.appendChild(document.createElement("div"));
4) insertAdjacentElement
box1.insertAdjacentElement('beforeend', document.createElement("div"));