The Glasgow Haskell Compiler User's Guide, Version 6.2
Prev | Chapter 6. Advice on: sooner, faster, smaller, thriftier | Next

# 6.3. Smaller: producing a program that is smaller

Decrease the “go-for-it” threshold for unfolding smallish expressions. Give a `-funfolding-use-threshold0` option for the extreme case. (“Only unfoldings with zero cost should proceed.”) Warning: except in certain specialised cases (like Happy parsers) this is likely to actually increase the size of your program, because unfolding generally enables extra simplifying optimisations to be performed.

Avoid `Read`.

Use `strip` on your executables.

Prev | Home | Next
Faster: producing a program that runs quicker | Up | Thriftier: producing a program that gobbles less heap space