[Haskell-cafe] Optimizing Haskell games with minimal changes.

Ivan Perez ivan.perez at keera.co.uk
Wed Oct 15 14:43:09 UTC 2014


Hi Café,

As you know, we are building Android games in Haskell, and efficiency is 
crucial.

I often find myself trying to explain to other game programmers that the 
price to be paid in speed in exchange for the robustness and the clarity 
of the language is minimal; and that optimising and parallelising can be 
very easy.

In our game we only had to apply very basic techniques (RWH, Chapter 25; 
Parallel & Concurrent Haskell, Chapter 2) to obtain a x7 speedup and 
reduce memory consumption from hundreds to 3MB on desktop. The number of 
changes to the codebase was minimal. I hope it helps support the case 
that using Haskell even for CPU demanding code is worth it.

Our game now also runs smoothly on Android. Hopefully this will also 
help others trying to achieve the same thing.

http://keera.co.uk/blog/2014/10/15/from-60-fps-to-500/

Cheers

Ivan

-- 
Facebook: https://www.facebook.com/keerastudios
Twitter: https://twitter.com/KeeraStudios
Web: http://www.keera.co.uk



More information about the Haskell-Cafe mailing list