Test name | Executions per second |
---|---|
createTextNode | 1143673.8 Ops/sec |
textContent | 2209212.2 Ops/sec |
innerText | 1499626.2 Ops/sec |
innerHTML | 2160306.2 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';