
On 02/10/09 13:21, Larry Evans wrote:
Oh! this is quite interesting. I will try it to see how it works. WHich implementation should perdorms better if any difference? [snip] BTW, what about the while_ template mentioned in my other recent
On 02/10/09 12:45, vicente.botet wrote: [snip] post. It seems that would be most general, and it just uses template recursion and eval_if. If simplified implementation *usually* means faster execution, then maybe while_ would be fastest. I know the non-variadic and_ uses recursion (as I mentioned in my reply to David), so; I don't think that would be a disadvantage. [snip] In the vault, under "Template Metaprogramming", there's a profile, in and_seq_profile.zip, of the find_if method and the while_ method for implementing and_seq. The while_ method shows 100 fewer instantiations for a 3 element vector of nullary logical metafunctions.
BTW, the profile was not put in the variadic_templates vault directory because I realized that while_ doesn't need to use the variadic template compiler.