[PATCH] D55045: Add a version of std::function that includes a few optimizations.

Eric Fiselier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 11:53:23 PST 2018


EricWF added a comment.

In D55045#1317136 <https://reviews.llvm.org/D55045#1317136>, @ldionne wrote:

> > I think this means we should only ever have at most 2 versions of `std::function`. One for the stable ABI and  potentially an improved version for the unstable ABI.
>
> This is where we disagree -- I don't think there's a universally better implementation of `std::function`. One implementation might be better in some circumstances and another implementation might be better in other circumstances, hence my claim that we should not go for a solution that assumes at most two implementations.


Our job is to provide a universal implementation of `std::function`, and hence pick one implementation which weights the different alternatives and chooses what we believe to be best in the majority of cases.

> On a different note, I still don't understand why this `std::function` is better from a benchmark perspective. Some interpretation of those pastes would be appreciated, and we still don't seem to be sure what the output is (% or delta?). @EricWF should know, since he wrote GoogleBenchmark?
> 
> Sorry if I seem to be setting the bar a bit high, but I think we need this before we basically double the maintenance burden of `std::function`.

Just above you suggested we get ready to add more than two implementations, but here you're setting a very high bar for adding one more?
I read this as a seeming contradiction.


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55045/new/

https://reviews.llvm.org/D55045





More information about the llvm-commits mailing list