On Thu, Feb 15, 2018 at 2:30 PM, Peter Dimov via Boost < boost@lists.boost.org> wrote:
Zach Laine wrote:
Doesn't seem so according to metaben.ch.
None of those measures time to compile simple construction.
There is such a benchmark, "make", and it does show std::tuple a lot slower (2-5x depending on number of elements.)
YAP tuples aren't going to have 100 elements though, and for short tuples, there isn't that much of a difference.
The problem is not that you're not creating long tuples, it's that you're creating many short ones. If you look at 10 elements, for example, it's still 10x faster to create a hana::tuple than a std::tuple (chart: https://imgur.com/a/To5JZ). If the cost of creating tuples dominates the compilation time for code that uses Yap, switching to std::tuple in the backend could incur a noticeable slowdown. Similarly, using something even more basic like hana::basic_tuple or rolling your own tuple (without EBO support for example) might yield additional speedups. Of course, it's hard to tell without doing the work and trying it out. Louis