Test name | Executions per second |
---|---|
createTextNode | 4311.3 Ops/sec |
textContent | 201219.9 Ops/sec |
innerText | 135851.4 Ops/sec |
innerHTML | 215929.2 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';