Test name | Executions per second |
---|---|
createTextNode | 1265293.0 Ops/sec |
textContent | 746.6 Ops/sec |
innerText | 794162.1 Ops/sec |
innerHTML | 38415.1 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';