Test name | Executions per second |
---|---|
createTextNode | 1418712.2 Ops/sec |
textContent | 3065472.0 Ops/sec |
innerText | 2070885.6 Ops/sec |
innerHTML | 3074916.2 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';