Test name | Executions per second |
---|---|
createTextNode | 426317.6 Ops/sec |
textContent | 7475414.5 Ops/sec |
innerText | 1807287.5 Ops/sec |
innerHTML | 234678.5 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';