Test name | Executions per second |
---|---|
createTextNode | 696612.1 Ops/sec |
textContent | 5344622.5 Ops/sec |
innerText | 1345529.1 Ops/sec |
innerHTML | 140824.2 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';