[Haskell-cafe] How far compilers are allowed to go with optimizations?

Erik Hesselink hesselink at gmail.com
Wed Feb 6 14:37:59 CET 2013


On Wed, Feb 6, 2013 at 1:18 PM, Austin Seipp <mad.one at gmail.com> wrote:
> Now, on a slight tangent, in practice, I guess it depends on your
> target market. C programs don't necessarily expose the details to make
> such rich optimizations possible. And Haskell programmers generally
> rely on optimizations to make order of magnitude performance
> difference in constant factors, although perhaps not in direct big-O
> terms (and no, this isn't necessarily bad)

I think some GHC optimizations do change at least space usage, even in
big-O terms. For example, strictness analysis can make folds go from
O(n) to O(1) space, I think.

Regards,

Erik



More information about the Haskell-Cafe mailing list