Test name | Executions per second |
---|---|
createTextNode | 394002.5 Ops/sec |
textContent | 1618564.2 Ops/sec |
innerText | 595347.1 Ops/sec |
innerHTML | 130860.2 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';