text.nodeValue vs text.textContent

Benchmark created on


Setup

const names = ['Daniel', 'Alex', 'Jacob', 'David', 'Natalie', 'Bridget'];

Test runner

Ready to run.

Testing in
TestOps/sec
nodeValue
const text = document.createTextNode();
//text.nodeValue = names[0];
ready
textContent
const text = document.createTextNode();
//text.textContent = names[0];
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.