Test name | Executions per second |
---|---|
createTextNode | 285689.4 Ops/sec |
textContent | 10780854.0 Ops/sec |
innerText | 3837178.2 Ops/sec |
innerHTML | 189952.4 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';