Test name | Executions per second |
---|---|
createTextNode | 95617.7 Ops/sec |
textContent | 655995.2 Ops/sec |
innerText | 211372.0 Ops/sec |
innerHTML | 31831.2 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';