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 Fundamentals (2-Day Course) with Alejandro Serrano (Online Course on 8th - 9th March 2021)
- Haskell Fundamentals (4-Day Course) with Alejandro Serrano (Online Course on 19th - 22nd April 2021)
- Haskell eXchange 2021 (Online Conference on 16th - 17th November 2021)
- Theorems for Free (SkillsCast recorded in November 2020)
- Comparing Strict and Lazy (SkillsCast recorded in November 2020)
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.