nodelist instanceof vs item method equality

Benchmark created on


Setup

var nodelist = document.all;
    var notnodelist = document.body;
    var item = NodeList.prototype.item;

Test runner

Ready to run.

Testing in
TestOps/sec
instanceof
nodelist instanceof NodeList;
notnodelist instanceof NodeList;
ready
item equality
nodelist.item === item;
notnodelist.item === item;
ready

Revisions

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