Wednesday, February 15, 2012

Slides from Haskell Performance Patterns talk

I gave a talk at the Bay Area Haskell Users Group today. As per usual, it was on the topic of performance. However, inspired by my new series on reliable techniques for writing fast Haskell code, the talk was structured around a set of rules-of-thumb and looks quite different from previous talks on the subject.

The slides are quite terse, but hopefully you'll get something out of them without me talking to them.


  1. When talking about making data structures spine-strict, perhaps you should have mentioned that this should be accompanied by adding strict versions of modifier functions to avoid thunk leaks (as described in ).

    1. If I understand your comment correctly, I think it's a slightly separate issues. Avoiding too much laziness e.g. in the values stored in a Map is also important, but it's not quite the same thing. You most likely want both though.

    2. What I had in mind is the case where someone converts a fully lazy data structure to spine-strict without changing the rest of the program and suddenly gets a massive thunk leak as described in the linked article.

    3. So from a pedagogical standpoint it would perhaps be nice to mention that this transformation can't be just applied locally to the data structure definition. Maybe your audience was sufficiently advanced and didn't need that hint.

    4. We spent over an hour and a half discussion the details of all these things. The slides don't do the topic justice without me talking to them.

    5. It's a pity that your talk wasn't recorded!