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 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Browser:
Firefox 140
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
1) innerHTML +=
8.2M/s
3) appendChild
5.0M/s
4) insertAdjacentElement
4.3M/s
2) insertAdjacentHTML
1.1M/s
View exact numbers
Test name
Executions per second
✓
1) innerHTML +=
8,245,170 Ops/sec
3) appendChild
4,994,681 Ops/sec
4) insertAdjacentElement
4,304,030 Ops/sec
2) insertAdjacentHTML
1,102,800 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);