Test name | Executions per second |
---|---|
createTextNode | 1397677.4 Ops/sec |
textContent | 3240991.8 Ops/sec |
innerText | 2277157.8 Ops/sec |
innerHTML | 3624357.2 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';