Larry Evans
Do you have the results of the benchmark:
https://github.com/ldionne/mpl11/blob/master/benchmark/foldl.rb
First, I would like to say that you should not draw conclusions from the benchmarks at this time: the current foldl implementation for MPL11 lists is not optimized at all. Also, I don't expect huge performance gains with foldl; we can't do _much_ better than the MPL here since each step depends on the previous one and so there's very little room for magic. There are larger gains with other metafunctions, but I'm not going into the details at this time. So, here is a benchmark where the same headers are included for all tryouts. What I mean is that we always include the headers necessary for mpl::vector, mpl11::list and so on. This is in order to reduce the difference due to including different headers. http://imgur.com/rz4PZjo As you can see, there is almost no difference. However, you can expect the MPL11 to be as good as the best on the graph since I will just use that implementation instead of the naive one when I'm ready to optimize. Here is a benchmark where each tryout only includes the headers it uses. This is the performance gain you would _actually_ get if you used one implementation over another in your code. http://imgur.com/uTIHi9D Again, don't forget that benchmarks should be taken lightly at this stage.
One problem with template metaprograms is the large compile times. The boost preprocessing library was used to alleviate this problem. The foldl.rb benchmark, IIUC, compares various techniques, including the existing boost::mpl technique. I sure others would be interested in seeing this comparison.
This is part of my material for C++Now 2014! Don't spoil attendance rates! :)
BTW, one template metafunction class in that benchmark was the until template. I'd consider adding this to the library. OTOH, the while_ metafunction here:
Thank you for the suggestion. In the MPL11, `while_` can
be implemented as (untested!):
template