Joachim Breitner

Guest lecture on Haskell performance

Published 2011-12-06 in sections English, Haskell.

Today, I had some business in Bonn, so Janis Voigtländer invited me to hold a guest lecture in his advanced functional programming course, maybe telling the students more about “real world” use of Haskell, given that he teaches mostly the theoretical foundations. I chose to discuss an experience I made while implementing SAT-Britney, namely that for the sake of good runtime and memory performance, it may be neither ideal to evaluate a list fully lazily, nor fully strict, but to have something in between. For the talk, I demonstrated this by a small example, showed how to use the GHCi debugger to get some insight in the evaluation order of things, how to benchmark the program and read the ghc statistics and a profiling chart, and finally how to get the most out of GHC’s List Fusion. I wanted to also touch on QuickCheck, but skipped it to finish in time. The full text of my talk (including graphs) is available, but in German; if you want an English version convince your prof to invite me for a guest lecture as well.

Afterwards I sat down with one of the students of the course, Helmut Grohne, who happened to take part in the Debian bug squashing party last weekend and had filed a release critical bug against the Haskell grammar generator frown (no better link available, homepage seems to be down) to debug the problem. It quickly became clear that the bug was introduced by me (can you spot it?) when trying to make it compile with a modern GHC – slightly embarrassing for me.

Comments

Lack of parentheses around (n-1) in "n-1 `div` 2"?
#1 Marius Gedminas (Homepage) am 2011-12-06
Correct.
#2 Joachim Breitner (Homepage) am 2011-12-06
Tss, und dann sagst Du nicht Bescheid, wenn Du in der Nähe bist… ;)
#3 mirabilos am 2011-12-07

Have something to say? You can post a comment by sending an e-Mail to me at <mail@joachim-breitner.de>, and I will include it here.