Test name | Executions per second |
---|---|
createTextNode | 1551635.8 Ops/sec |
textContent | 7420999.5 Ops/sec |
innerText | 2277277.2 Ops/sec |
innerHTML | 988696.3 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';