>> In the functional version of poly-mul, why doesn't it call poly-simp? >> I'm concerned that if you leave the simplification up to the very end, >> it might not be as effective as if it were being done all the time.
The reason I brought this up is because, intuitively, here is where I'd expect the choice of representation really matters. Since terms with the same power don't coalese until poly-simp gets called, and since poly-simp gets called only after mega-mul, I can imagine the representation exploding exponentially right here. How large is the input that you've been feeding to this? That gives us a better sense of the scope of the problem. I did a quick scan for "sparse polynomial multiplication" and came across: http://dl.acm.org/citation.cfm?id=1086837.1086847 which may apply to this problem; I haven't read through the paper to see how friendly it is to functional implementation. ____________________ Racket Users list: http://lists.racket-lang.org/users