Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
innerHTML vs insertAdjacentHTML vs appendChild vs insertAdjacentElement
innerHTML vs insertAdjacentHTML vs appendChild vs insertAdjacentElement
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 9; SM-N950F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.101 Mobile Safari/537.36 OPR/60.0.3004.55063
Browser:
Opera Mobile 60
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
1) innerHTML +=
411128.6 Ops/sec
2) insertAdjacentHTML
98110.8 Ops/sec
3) appendChild
306187.8 Ops/sec
4) insertAdjacentElement
281011.1 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(box2);
4) insertAdjacentElement
box1.insertAdjacentElement('beforeend', box2);