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

Jordan Soyke via Phabricator reviews at reviews.llvm.org
Fri Nov 30 07:21:52 PST 2018

jsoyke added a comment.

> The output is the time delta, not a fraction. It's the output of libcxx/utils/google-benchmark/tools/compare.py. Some of the operations are sub-nano-second so it's handy for that. The times are so low here we may want to time ~10 operations or something instead of just one, but the comparison seems roughly inline with what I've seen with our internal tools.

I think I may have been wrong about this... I haven't really used this tool much, it might be nice if it showed % or something.

I added a benchmark that instantiates many different types of functors to get a feel for how this would behave in a more realistic setting:

  Benchmark                              Time             CPU      Time Old      Time New       CPU Old       CPU New
  BM_MixedFunctorTypes                -0.3121         -0.3122         19677         13535         19677         13534

Looking at that it seems like the -0.3121 must be a fraction... Not sure why I thought it was a delta.

I need to statically generate a bunch of different types in this new benchmark, which makes compilation really slow. Interested in suggestions on how to improve that.

  rCXX libc++



More information about the libcxx-commits mailing list