Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
adding elements
(version: 1)
Comparing performance of:
dom version vs content version
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here--> <div id="thingy"></div>
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
dom version
const thingy = document.getElementById( "thingy" ) const table = document.createElement( "table" ) for( let i = 0; i < 100; i++ ) { const tr = document.createElement( "tr" ) table.append( tr ) for( let j = 0; j < 6; j++ ) { const td = document.createElement( "td" ) td.append( "something" ) tr.append( td ) } } thingy.append( table )
content version
const thingy = document.getElementById( "thingy" ) let content = "<table>" for( let i = 0; i < 100; i++ ) { content += "<tr>" for( let j = 0; j < 6; j++ ) { content += "<td>something</td>" } content += "</tr>" } thingy.innerHtml = content + "</table>"
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
dom version
content version
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0
Browser/OS:
Firefox 138 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
dom version
1954.5 Ops/sec
content version
287643.8 Ops/sec
Related benchmarks:
closest comparision
closest comparision 2
className vs classList normalization
Splti vs Trim vs replace className
testingqueries
Multiple .closest() or complex CSS selector
Query Element
Test id vs next sibbling
set: innerHTML vs outerHTML
Comments
Confirm delete:
Do you really want to delete benchmark?