[Haskell] ANNOUNCE: OmegaGB, Haskell Game Boy Emulator
bit at mutantlemon.com
Wed Apr 4 08:07:56 EDT 2007
Thanks for the reply.
I think that you are right that laziness and too much abstraction are
the main reasons for low performance.
I've actually received some patches from a Mr. Lemmih, who converted
some of the code to use the ST monad, and managed to get results with
very good performance. I am confident that with work, it should be
possible to complete the omegagb project and have a working game boy
emulator written in pure haskell.
On the other hand, I would like to mention that I have reimplemented
most of the omegagb code in C, just for fun. Obviously it runs much
faster then the haskell version, by a factor of about 20. More
interestingly though, is that the C version isn't longer, it's not
more verbose, and it's not any harder to read then the haskell
version. It doesn't have any of the monad goodness of the haskell
version, and it would probably be harder to proove things about the
code, but there is something to be said for lean and mean C code. The
C language is a very good fit for this problem domain.
If I had to do a real world project for a similar problem, I'm not
sure that haskell would have that much of an advantage over C, even if
performance wasn't an issue. Then again, I imagine that If I were to
try to attempt to make an emulator for a computer more complicated
then the game boy, then a hybrid C/Haskell approach might be very
I'm putting OmegaGB on the back burner for now and am moving on to
More information about the Haskell