no optimization for :eq, :lt, :first
Doing a
- $(document.body).find("*:lt(10)")
takes just as long as
- $(document.body).find("*")
so I think it's getting all elements and then selects the first 10. It should be optimized to only get the first 10 elements in the first place and not go through the whole tree pointlessly.
Same thing happens for :eq and :first. Both should stop once the required element was found.