Test name | Executions per second |
---|---|
createTextNode | 294946.4 Ops/sec |
textContent | 7347900.0 Ops/sec |
innerText | 3020959.8 Ops/sec |
innerHTML | 211893.5 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';