cloneNode vs createElement

Benchmark created on


Description

Meh...

Setup

const div = document.createElement('div');
div.className = "lala";

Test runner

Ready to run.

Testing in
TestOps/sec
cloneNode
const div2 = div.cloneNode(false)
ready
createElement
const div2 = document.createElement('div');
div2.className = "lala";
ready

Revisions

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