Test name | Executions per second |
---|---|
createTextNode | 1422064.8 Ops/sec |
textContent | 2692717.8 Ops/sec |
innerText | 1766767.6 Ops/sec |
innerHTML | 2672586.0 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';