From: Max Motovilov (max_at_[hidden])
Date: 2008-03-16 13:39:24
> other implementations. If you post your benchmark, I could
> actually make a comparison.
Attaching the test program along with both versions of the
product_view<>. I used the following [bash] commands to benchmark it:
> for n in 1 2 3 4 5 6 7 8 9;
> do time g++-4.2 -DCOUNT=$n test_product_view.cpp;
> for n in 1 2 3 4 5 6 7 ;
> do time g++-4.2 -DCOUNT=$n -DRECURSIVE test_product_view.cpp;
Note that both my versions produce flattened view (a sequence of tuples
which are sequences of the same kind as the top-level sequence of the
argument). Whether the flattened or the nested representations are more
correct is, of course, a philosophical question -- but I originally
needed the flattened view for my particular application.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk