Test name | Executions per second |
---|---|
createTextNode | 342714.7 Ops/sec |
textContent | 6576021.0 Ops/sec |
innerText | 1167512.8 Ops/sec |
innerHTML | 175961.5 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';