Test name | Executions per second |
---|---|
createTextNode | 358504.7 Ops/sec |
textContent | 2587447.8 Ops/sec |
innerText | 566905.9 Ops/sec |
innerHTML | 100884.6 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';