Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
appendChild vs append vs map/append vs DocumentFragment
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Browser:
Chrome 126
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
appendChild
139K/s
append
127K/s
map/append
108K/s
DocumentFragment
92K/s
View exact numbers
Test name
Executions per second
✓
appendChild
139,101 Ops/sec
append
127,167 Ops/sec
map/append
108,043 Ops/sec
DocumentFragment
91,901 Ops/sec
Tests:
appendChild
const ul = document.createElement('ul'); for (const d of '123456') { const li = document.createElement('li'); li.textContent = d; ul.appendChild(li); }
append
const ul = document.createElement('ul'); for (const d of '123456') { const li = document.createElement('li'); li.textContent = d; ul.append(li); }
map/append
const ul = document.createElement('ul'); const lis = Array.from('123456').map((d) => { const li = document.createElement('li'); li.textContent = d; return li; }); ul.append(...lis);
DocumentFragment
const ul = document.createElement('ul'); const fragment = new DocumentFragment(); for (const d of '123456') { const li = document.createElement('li'); li.textContent = d; fragment.append(li); } ul.append(fragment);