Test name | Executions per second |
---|---|
createTextNode | 4155.7 Ops/sec |
textContent | 194712.4 Ops/sec |
innerText | 133014.5 Ops/sec |
innerHTML | 194655.1 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';