Please log in to watch this conference skillscast.
Confused by foldl' vs foldl? Unsure when you've got the strictness right? Programs taking too much memory and running too slow? You are not alone! Most Haskell programs suffer from "space leaks" - this talk covers examples (all only found and fixed in the last year) from the base library, QuickCheck, pretty, Happy, Alex and Shake. Some fixes saved over 1Gb of memory! Space leaks occur when a program uses more memory than necessary. Haskell, as a lazy language, is particularly vulnerable to a form of space leak where a small accumulator (e.g. an Int) is instead represented by a sequence of updates that grows on each iteration. In this talk, you will learn the gritty details of space leaks, then the session sets off on a quest to remove them from all Haskell programs. You will explore the relationship between space leaks and stack usage, then how to use the existing tools built in to GHC to detect and debug excessive stack usage. These techniques have already slain lots of space leaks, and hopefully in your hands they can destroy even more.
YOU MAY ALSO LIKE:
- Fixing Haskell Records (SkillsCast recorded in October 2019)
- Lightbend Akka for Scala - Professional (in London on 11th - 12th November 2019)
- Lightbend Scala Language - Professional (in London on 10th - 11th December 2019)
- Clojure eXchange 2019 (in London on 2nd - 3rd December 2019)
- Scala eXchange London 2019 (in London on 12th - 13th December 2019)
- Code Kata: Yilin Wei - Optics with Monocle (in London on 22nd October 2019)
- Reprogramming Biology with F# (in London on 28th November 2019)
- Lightning Talk: Making and Testing Code Generators in Haskell (SkillsCast recorded in October 2019)
- GHC Runtime Linker by Example (SkillsCast recorded in October 2019)
Plugging Space Leaks, Improving Performance
Neil Mitchell is a Haskell programmer who lives in Cambridge with his wife Emily and his son Henry. Neil has a PhD in Computer Science from York University, working on making functional programs shorter, faster and safer. Since then he's worked with F# at Credit Suisse and Haskell/F#/C++ at Standard Chartered and Barclays, taking the lessons of functional programming and applying them in finance.