Test name | Executions per second |
---|---|
createTextNode | 2633878.0 Ops/sec |
textContent | 4010845.0 Ops/sec |
innerText | 2354223.8 Ops/sec |
append | 4411581.0 Ops/sec |
new text | 3411447.5 Ops/sec |
var a = document.createElement('a');
a.appendChild(document.createTextNode('text'));
a.textContent = 'text';
a.innerText = 'text';
a.append('text');
a.appendChild(new Text('text'));