Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
appendChild vs append 2
(version: 0)
Comparing performance of:
appendChild 1 vs append 1 vs appendChild 2 vs append 2
Created:
2 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<div id="A"></div> <p id="B">1234</p>
Tests:
appendChild 1
A.appendChild(B);
append 1
A.append(B);
appendChild 2
const C = document.querySelector("#A"); const D = document.querySelector("#B"); C.appendChild(D);
append 2
const C = document.querySelector("#A"); const D = document.querySelector("#B"); C.append(D);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
appendChild 1
append 1
appendChild 2
append 2
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
2 years ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Browser/OS:
Chrome 123 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
appendChild 1
165610.6 Ops/sec
append 1
156707.1 Ops/sec
appendChild 2
260280.1 Ops/sec
append 2
244562.2 Ops/sec
Related benchmarks:
lodash merge vs jquery extend
lodash merge vs jquery extend
lodash join vs Object join
While loop parentElement vs closest (vanilla javascript)
array.from.map vs array.from with map
Comments
Confirm delete:
Do you really want to delete benchmark?