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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to