I think sorting the objects should be the default.  Considering that this function already allocates, would always sorting be a noticeable performance hit?