Right now the comparison is using three way comparison with the spaceship operator. It is also handling comparisons where the types are different requiring more branches in the comparison code.
We should utilize the fact that we've already compared the types and just need a simple less or more compare.
- causes
-
SERVER-61106 Time-series bucket min/max summaries incorrect for the same canonical type but different underlying type
- Closed
- related to
-
SERVER-58094 Replace BSONElement::woCompare calls with BSONElement::compare where possible
- Closed