Test name | Executions per second |
---|---|
createTextNode | 230995.8 Ops/sec |
textContent | 7247903.5 Ops/sec |
innerText | 1967177.8 Ops/sec |
innerHTML | 153547.2 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';