Test name | Executions per second |
---|---|
createTextNode | 390119.6 Ops/sec |
textContent | 2196028.2 Ops/sec |
innerText | 600419.2 Ops/sec |
innerHTML | 84730.7 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';