Test name | Executions per second |
---|---|
createTextNode | 512778.1 Ops/sec |
textContent | 9193777.0 Ops/sec |
innerText | 3801373.8 Ops/sec |
innerHTML | 149220.8 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';