V8 sorting optimization

I am glad to hear that my patch to jQuery has been accepted and committed. The problem was that Sizzle relies on the comparison function to be fired but V8 does not fire the function if objects are equal to each other (i.e. if they point to the same object in the underlying structure).

[document, document].sort(cmp); // cmp will never be called
[document, window].sort(cmp); // cmp will be called once

By the way, jQuery development mailing list is really nice. I thought I am going to subscribe just to discuss this one ticket but I am still there, reading their discussions about the library development.