This SkillsCast is currently only available to registered attendees of Haskell eXchange 2020
It will be freely available to all Skills Matter members once the Haskell eXchange 2020 early-access window expires on December 04, 2020.
Let's tune a Haskell program to be as fast as C! (1) Begin with smallpt, a 100 line C raytracer that we naively port to Haskell. (2) balk at the 5x performance slowdown. (3) Roll up our sleeves. (4) Performance parity!
Smallpt is a tiny ray-tracer in C that's been ported to many languages due to its size and simplicity. Unfortunately, the Haskell version is slow: 5-8x slowdown on a naive translation. In this talk, we are going to first port it to Haskell, and then make it fast, by using GHC pragmas, inspecting Core, reading GHC's profiling information, and reasoning about Haskell's execution model.
Attendees will learn how to tune a program that's neither too small (a micro-benchmark) nor too large (a monolith): This application is small enough to be digested, while large enough to exhibit "interesting" performance optimisations. It's a good case study to get one’s feet wet into Haskell optimisation.
YOU MAY ALSO LIKE:
Smallpt-hs: Porting a Raytracer's Performance to Haskell
For the past 8 or so years davean has been relying on Haskell to keep his code performant and functional.
Siddharth is a Master's student at IIIT Hyderabad, India. He is interested in (and studying) compiler optimisations.