Test name | Executions per second |
---|---|
createTextNode | 358509.8 Ops/sec |
textContent | 3086282.2 Ops/sec |
innerText | 564814.8 Ops/sec |
innerHTML | 114255.4 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';