News for hackers. Stuff that matters.
Re:Safety vs. Performance. A case study of C, C++ and Rust s... by prosqlinjector on Thursday October 05, 2023 @09:14PM (#37786187)
> to not work properly with the comparer, even if the criterion is correct.

Then the algorithm is incorrect or its specification for the compare function.

> The example the article gives is a comparer that increments a variable each time it's called, to count the number of comparisons. Depending on how this is done and how the sorter is implemented, copying the comparer may break this behavior.

Yep, then that means the comparer is not valid and does not satisfy the necessary requirements.

There are no comments on this comment yet.