Test name | Executions per second |
---|---|
createTextNode | 4487.8 Ops/sec |
textContent | 205897.1 Ops/sec |
innerText | 136852.2 Ops/sec |
innerHTML | 218928.8 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.innerHTML = 'text';