Optimized BSONComparator's compare