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)
- F# eXchange 2020 (Online Conference on 21st October 2020)
- Haskell eXchange 2020 (Online Conference on 3rd - 4th November 2020)
- What's in a Functional Compiler? (SkillsCast recorded in July 2020)
- Intro to OCaml (SkillsCast recorded in June 2020)
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.