Please log in to watch this conference skillscast.
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:
- Haskell eXchange 2021: Novice Track (Online Conference on 15th November 2021)
- Haskell eXchange 2021: Pro Track (Online Conference on 16th - 17th November 2021)
- Hashing Modulo Alpha Equivalence (SkillsCast recorded in May 2021)
- In The Belly Of The Whale: Tales From Haskell In The Enterprise (SkillsCast recorded in May 2021)
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.