Test name | Executions per second |
---|---|
createTextNode | 852889.8 Ops/sec |
textContent | 5483639.5 Ops/sec |
innerText | 1372629.5 Ops/sec |
innerHTML | 206081.1 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';