Test name | Executions per second |
---|---|
createTextNode | 4763.8 Ops/sec |
textContent | 196928.8 Ops/sec |
innerText | 136203.6 Ops/sec |
innerHTML | 197863.6 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';