Script Preparation code:
x
 
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);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Template
    Div

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 months ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36
Chrome Mobile 128 on Android
View result in a separate tab
Test name Executions per second
Template 47166.5 Ops/sec
Div 60763.9 Ops/sec