Test name | Executions per second |
---|---|
createTextNode | 681171.0 Ops/sec |
textContent | 4731760.5 Ops/sec |
innerText | 996114.5 Ops/sec |
innerHTML | 126255.9 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';