There is no answer to this question, but regarding the :last selector that you use, it is a proprietary extension of the Selectors API standard. Because of this, this is not valid for use with the native .querySelectorAll method.
That Sizzle is basically trying to use your selector with .querySelectorAll , and if it throws an exception due to an invalid selector, it will use JavaScript based DOM select / filter by default.
This means that turning on selectors like :last will result in you not getting DOM acceleration with your own code.
In addition, optimizations are included, so when your selector is very simple, for example, only the identifier or element name, the native getElementById and getElementsByTagName will be used, which are very fast; usually even faster than querySelectorAll .
And since the .last() method just grabs the last element in the collection, rather than filtering all the elements that Sizzle filters usually do (at least they were used), which will also give a boost.
IMO, stay away from proprietary material. Now that .querySelectorAll pretty ubiquitous, there are real benefits only with standard selectors. Make another choice of DOM filter message.
In the case of $("#vacations").find("li") do not worry about the intermediate results. This will use getElementById followed by getElementsByTagName and will be very fast.
If you are really very concerned about speed, reduce the use of jQuery and use the DOM directly.
Currently, you will find notes in the docs for selectors like :last , which warn you about performance loss:
Since: the latter is a jQuery extension and not part of the CSS specification, queries using :last cannot take advantage of the performance enhancement provided by the DOM's querySelectorAll() built-in method. For best performance when using :last to select elements, first select the elements using a clean CSS selector, then use .filter(":last") .
But I would not agree that .filter(":last") would be a good replacement. Much better would be methods like .last() , which would target the element directly, rather than filtering the set. I have a feeling that they just want people to continue using their custom selectors. IMO, you better just forget about them.