On Sun, 17 Dec 2000, Ben Tilly wrote:

> Is there any reason that your flatten_by function takes a
> parameter?  I would think it would be faster to have it just
> flatten once (don't do the recursive call).  If someone wants
> to flatten 6 times, they can call it 6 times.

Yes, the recursion definitely slows it down:

                             user     system      total        real
mine, n=1, 50000 times:  3.090000   0.000000   3.090000 (  3.084253)
yours, 50000 times:      1.350000   0.000000   1.350000 (  1.353538)

I just wanted to generalize it -- no special reason for the
recursion beyond that.  


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav