Test name | Executions per second |
---|---|
createTextNode | 1362388.2 Ops/sec |
textContent | 2687807.2 Ops/sec |
innerText | 1748530.8 Ops/sec |
innerHTML | 2664839.8 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';