Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
createElement vs createElementNS
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 125
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
createElement
118159.8 Ops/sec
createElementNS
110575.7 Ops/sec
HTML Preparation code:
<div></div>
Tests:
createElement
const div = document.createElement('div') div.innerHTML = Math.random().toString(); return div.outerHTML;
createElementNS
const div = document.createElementNS('http://www.w3.org/1999/xhtml', 'div') div.innerHTML = Math.random().toString(); return div.outerHTML;