Test name | Executions per second |
---|---|
createTextNode | 396914.2 Ops/sec |
textContent | 11563049.0 Ops/sec |
innerText | 2729278.2 Ops/sec |
innerHTML | 213486.1 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';