Test name | Executions per second |
---|---|
createTextNode | 1343452.2 Ops/sec |
textContent | 6255453.0 Ops/sec |
innerText | 1796247.0 Ops/sec |
innerHTML | 189921.4 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';