Test name | Executions per second |
---|---|
createTextNode | 540071.1 Ops/sec |
textContent | 1240456.0 Ops/sec |
innerText | 624159.2 Ops/sec |
innerHTML | 1284349.6 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';