:last vs .last() (v7)

Revision 7 of this benchmark created by kp on


Description

fastest

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
:last
$("body > div:last");
ready
.last( )
$("body > div").last();
ready
:last #2
$('body > div[id^="DIV_"]:last');
ready
.last() #2
$('body > div[id^="DIV_"]').last();
ready
:last #3
$('body').children('div:last');
ready
.last() #4
$('body').children('div[id^="DIV_"]').last();
ready

Revisions

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