Test name | Executions per second |
---|---|
createTextNode | 1701288.5 Ops/sec |
textContent | 7589376.0 Ops/sec |
innerText | 1964585.4 Ops/sec |
innerHTML | 483320.8 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';