Test name | Executions per second |
---|---|
createTextNode | 340912.3 Ops/sec |
textContent | 6244801.5 Ops/sec |
innerText | 1374766.9 Ops/sec |
innerHTML | 146240.8 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';