[Haskell-cafe] Re: Looking for the fastest Haskell primes

Achim Schneider barsoap at web.de
Thu Apr 16 05:07:00 EDT 2009

Eugene Kirpichov <ekirpichov at gmail.com> wrote:

> The parameterless version is a top-level definition and won't get
> garbage-collected, IIRC.
> So, if you evaluate primes!!10000000, you'll end up with a
> 10000000-element list hanging in memory forever.
> If you evaluate (primes' ()) !! 10000000, you won't.
{-# CAF foo #-}
{-# NOCAF foo #-}

(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.

More information about the Haskell-Cafe mailing list