Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Compration of create nodes
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/119.0.6045.193 Mobile DuckDuckGo/5 Safari/537.36
Browser:
Chrome Mobile 119
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
1
18747.1 Ops/sec
2
55512.4 Ops/sec
Script Preparation code:
var data = ` <div> <h1>wert</h1> <h2>wert</h2> <h3>wert</h3> <h5>wert</h5> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> <p>gasdf</p> </div> ` var insertDom = (string) => { const t = document.createElement('template') t.innerHTML = string return t.content } const createInsertDom2 = (string) => { const res = insertDom(string) return () => { const t = document.createElement('template') t.innerHTML = string return res.cloneNode(true) } } var insertDom2 = createInsertDom2()
Tests:
1
insertDom(data)
2
insertDom2(data)