Test name | Executions per second |
---|---|
createTextNode | 1043573.6 Ops/sec |
textContent | 2015922.9 Ops/sec |
innerText | 1444184.9 Ops/sec |
innerHTML | 248880.4 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';