[Haskell-cafe] Cost: (:) vs head

Bas van Dijk v.dijk.bas at gmail.com
Sat Sep 11 11:38:51 EDT 2010


On Sat, Sep 11, 2010 at 4:16 PM, Daniel Fischer
<daniel.is.fischer at web.de> wrote:
> ...
> I don't pretend to understand at the processor level why f4's loop is
> faster that f2's and f3's, but I've observed on several occasions that
> parameter order plays a big rôle for performance. Apart from the rule to
> order them in increasing order of variation, on my box, getting Int#
> parameters first (in the core) is better (in particular, getting them
> before Double# parameters, doesn't seem to make so much difference for
> lists or boxed types in general), so that might explain the difference.
> ...

Thanks, I'll keep that in mind.

Bas


More information about the Haskell-Cafe mailing list