Test name | Executions per second |
---|---|
createTextNode | 371313.8 Ops/sec |
textContent | 7966088.0 Ops/sec |
innerText | 1290669.1 Ops/sec |
innerHTML | 186014.7 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';