Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
template vs div (fixed)
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/128.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 128
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Template
38830.6 Ops/sec
Div
54551.9 Ops/sec
Script Preparation code:
function template(html) { var t = document.createElement('template'); t.innerHTML = html; return t.content.firstChild; } function div(html) { var t = document.createElement('div'); t.innerHTML = html; return t.firstChild; } var html = '<tr><td class="col-md-1"></td><td class="col-md-4"><a></a></td><td class="col-md-1"><a><span class="glyphicon glyphicon-remove" aria-hidden="true" /></a></td><td class="col-md-6" /></tr>';
Tests:
Template
template(html).cloneNode(true);
Div
div(html).cloneNode(true);