Test name | Executions per second |
---|---|
createTextNode | 1554625.1 Ops/sec |
textContent | 6637041.0 Ops/sec |
innerText | 1512236.0 Ops/sec |
innerHTML | 586383.6 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';