Test name | Executions per second |
---|---|
createTextNode | 250233.9 Ops/sec |
textContent | 7163439.0 Ops/sec |
innerText | 2061524.2 Ops/sec |
innerHTML | 186498.7 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';