Performance | hasOwnProperty | Sizzle (v2)

Revision 2 of this benchmark created on


Description

https://github.com/jquery/sizzle/issues/21#comment_1068905

Preparation HTML

<script src="//pastebin.com/raw.php?i=cYRNQMG2"></script>
<script src="//pastebin.com/raw.php?i=43ZyUute"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Sizzle without hasOwnProperty
var S = Sizzle;
if (S(""
p div.test ").length !== 5) {
 throw new Error("
Bad result!");
}
ready
Sizzle with hasOwnProperty
var S = SizzleWithHasOwnProperty;
if (S("p div.test").length !== 5) {
 throw new Error("Bad result!");
}
ready

Revisions

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