Test name | Executions per second |
---|---|
createTextNode | 383860.7 Ops/sec |
textContent | 7341276.5 Ops/sec |
innerText | 1910888.6 Ops/sec |
innerHTML | 289732.2 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';