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 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0
Browser:
Firefox 125
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
1
91097.7 Ops/sec
2
502595.8 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)