Test name | Executions per second |
---|---|
createTextNode | 5186.5 Ops/sec |
textContent | 1873639.4 Ops/sec |
innerText | 1796882.6 Ops/sec |
innerHTML | 470404.5 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';