[PATCH] D52697: Bug 39129: Speeding up partition_point/lower_bound/upper_bound/ by using unsigned division by 2 when possible.

Denis Yaroshevskiy via Phabricator reviews at reviews.llvm.org
Sun Sep 30 15:27:34 PDT 2018

dyaroshev added a comment.

In https://reviews.llvm.org/D52697#1250525, @mclow.lists wrote:

> We can tell the compiler that `std::distance` always returns >= 0.
>  The optimizer already knows a lot about various standard library calls.

Oh, that could be interesting. Or this could be an example of the contracts based optimization.

You don't think that it's right to merge this patch? The performance wins are pretty nice. There are plenty of other things for optimizer guys to work on, this is a quite specific case.


More information about the libcxx-commits mailing list