Test name | Executions per second |
---|---|
createTextNode | 551699.4 Ops/sec |
textContent | 3599581.8 Ops/sec |
innerText | 1041721.2 Ops/sec |
innerHTML | 150035.9 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';