Test name | Executions per second |
---|---|
createTextNode | 1522777.5 Ops/sec |
textContent | 6599484.5 Ops/sec |
innerText | 1747512.1 Ops/sec |
innerHTML | 891647.3 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';