innerHTML vs createTextNode (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
innerHTML
const root = document.createElement('div');
root.innerHTML = `text without links`;
console.log("t1", root.innerHTML);
ready
createTextNode
const root = document.createElement('div');
root.appendChild(document.createTextNode(`text without links`);
console.log("t2", root.innerHTML);
ready

Revisions

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