Test name | Executions per second |
---|---|
createTextNode | 395922.2 Ops/sec |
textContent | 13880220.0 Ops/sec |
innerText | 3231703.0 Ops/sec |
innerHTML | 228464.4 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';