[Haskell-cafe] Re: Another optimization question

Bulat Ziganshin bulat.ziganshin at gmail.com
Sun May 18 11:14:33 EDT 2008


Hello Luke,

Sunday, May 18, 2008, 7:11:13 PM, you wrote:

>> primes :: Integral a => [a]

> you might be computing the list of primes many times.  Using a
> monomorphic signature like [Int] or [Integer] will allow primes to be
> cached, probably increasing the performance quite dramatically.

besides caching, polymorphism decreases performance many tens times


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list