Test name | Executions per second |
---|---|
createTextNode | 1156899.2 Ops/sec |
textContent | 4200321.0 Ops/sec |
innerText | 1607617.6 Ops/sec |
innerHTML | 303974.7 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';