Test name | Executions per second |
---|---|
createTextNode | 511639.3 Ops/sec |
textContent | 10277673.0 Ops/sec |
innerText | 2026346.0 Ops/sec |
innerHTML | 269587.1 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';