The solution to this one is provided by Joaquin, in his reply below:
I tried compiling your code with MSVC++ 8.0 and it is indeed incredibly slow. After playing a little with the code I realized that MPL views are the culprit here: for some reason it is much faster to fold on a vector-based computation rather than a view:
template
Shouldn't there be a dot-product or cross-product of mpl sequences as a general algorithm? and not just 2 sequences but N.
I guess it is the O(n^2) behavior that deterred the author from including the algorithm (much as STL usually does not contain quadratic algorithms). It might be a worthy addition, nonetheless Joaquin --------- Interesting why a joint_view slower than the alternative. This result confirmed then on MSVC8 , gcc4.1, Intel10... regards, /Hicham