Test name | Executions per second |
---|---|
createTextNode | 360409.9 Ops/sec |
textContent | 7864717.5 Ops/sec |
innerText | 3154221.5 Ops/sec |
innerHTML | 307369.9 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';