Test name | Executions per second |
---|---|
createTextNode | 306273.7 Ops/sec |
textContent | 8652935.0 Ops/sec |
innerText | 3388240.0 Ops/sec |
innerHTML | 195644.4 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';