[Haskell-cafe] Re: Haskell performance (again)!

Cale Gibbard cgibbard at gmail.com
Mon Oct 9 05:01:03 EDT 2006

On 08/10/06, apfelmus at quantentunnel.de <apfelmus at quantentunnel.de> wrote:
> large -> large    depends on large input like above
>                   but roughly same otherwise
> small -> large    roughly same

Actually, it's an important point that laziness is generally
preferable in these cases as well, since the large result might never
be completely demanded, so if the function is lazy, then it will waste
no time computing things that are never needed.

I might also like to point out that by "small" and "large", we're
actually referring to the number of ways in which components of the
datastructure can be computed separately, which tends to correspond
nicely to how one usually pictures small and large pieces of data.

More information about the Haskell-Cafe mailing list