[Haskell-cafe] Cache miss performance costs for Haskell programs?

Rob Stewart robstewart57 at gmail.com
Tue Aug 30 15:23:16 UTC 2016


Any Haskell profiling and performance tuning blog or tutorial will
advise the use of memory space and runtime profiling, using GHC
tooling. Far less is said about the impact of increased cache miss
rates as program size increases.

The paper "Secrets of the Glasgow Haskell Compiler inliner", in the
Journal of Functional Programming, July 2002, talks a lot about the
benefits of inlining, i.e. it's part of GHCs simplifier as it enables
many other optimisations, some that ultimately reduce program size.

Not much is said about detrimental effect that bad inlining choices
has to runtime. The paper says: "Bloated programs are bad (increased
compilation time, lower cache hit rates)" in Section 2.2.

I'd really like to see how badly Haskell runtimes are affected as
cache hit rates decrease. Is anyone aware of any empirical studies, or
papers, or blog posts, that show examples where:

For the same Haskell program, increasing inlining causes lower cache
hit rates, which slows down runtime due to costly cycles to fetch from
main memory more often.



More information about the Haskell-Cafe mailing list