Test name | Executions per second |
---|---|
createTextNode | 281911.9 Ops/sec |
textContent | 6116205.5 Ops/sec |
innerText | 1029587.0 Ops/sec |
innerHTML | 150695.5 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';