Test name | Executions per second |
---|---|
createTextNode | 323704.9 Ops/sec |
textContent | 5423001.5 Ops/sec |
innerText | 2225456.0 Ops/sec |
innerHTML | 197372.3 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';