
28 Oct
2007
28 Oct
'07
4:55 p.m.
Prabhakar Ragde wrote:
You could try giving divisors type signature: divisors :: Int -> [Int]
Thank you. That brings the time down to 0.5 seconds. I'm glad it was something as simple as that. --PR
I assume GHC was smart enough to do inlining and such in this case, so the difference is that it defaulted to Integer, whose operations are somewhat slower. Isaac