speedup help

Damien R. Sullivan dasulliv@cs.indiana.edu
Mon, 3 Mar 2003 20:30:32 -0500


On Tue, Mar 04, 2003 at 12:25:01PM +1100, Andrew J Bromage wrote:

> Or, even better, if you didn't multiply stuff that you're just going
> to divide out in the first place.

I had thought of that before, and used a simple
comb m n = product [m, m-1 .. m-n+1] / fact (m-n)

but the unmemoized product proved to be slower than the original.

This looks rather different, though. :)

-xx- Damien X-)