Test name | Executions per second |
---|---|
createTextNode | 328229.6 Ops/sec |
textContent | 5005791.0 Ops/sec |
innerText | 1495833.2 Ops/sec |
innerHTML | 154395.7 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';