Test name | Executions per second |
---|---|
createTextNode | 1497013.9 Ops/sec |
textContent | 3005244.2 Ops/sec |
innerText | 2165850.8 Ops/sec |
innerHTML | 3395209.5 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';