cloneNode vs createElement Performance (v18)

Revision 18 of this benchmark created on


Description

check speeds with different elements

Preparation HTML

<script>
  var a = document.createElement("a");
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
clone a
var aClone = a.cloneNode(false);
aClone.href = "http://google.com/foo/bar?question=mark&me=notmark#hash"
var b = aClone.hash
var c = aClone.search
ready
create a
var aa = document.createElement("a");
aa.href = "http://google.com/foo/bar?question=mark&me=notmark#hash"
var b = aa.hash
var c = aa.search
ready
use same a
a.href = "http://google.com/foo/bar?question=mark&me=notmark#hash"
var b = a.hash
var c = a.search
ready

Revisions

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