What about Haskell GC performance for real-time applications such as games?

Since I realized that the logic of the rules of the game should handle tremendous complexity, I am considering using a non-standard language in the playing field as the language of the game script. The reason for the game script is complex logic with less code. Therefore, a very well-distracted language is required.

But the most well-abstracted languages ​​use GC. And, as a rule, GCs do processor loading. Basically, he puts off the memory cleanup operation and does it right away. Very important for real-time graphics, including games and the graphical interface.

AFAIK, the Haskell GC is slightly different from other GC-based languages, which is the reason for the immutable attribute. It’s hard to imagine. I could not find this document in detail.

What is the difference? And is it really a batch package for long running programs? (well-distributed load over time, manual full GC command can be called for each tick)

+23
performance garbage-collection haskell real-time soft-real-time
Dec 19 '10 at 12:45
source share
3 answers

You can watch the thread initiated by Luke Palmer here: http://www.haskell.org/pipermail/haskell-cafe/2010-February/thread.html#73881

+6
Dec 19 '10 at 13:50
source share

You might be interested in this Simon Marlowe blog post about moving the GHC from the stop-the-world collection to something more parallel to the pause period is more suitable for real-time applications such as games.

I have not tested the GHC latency profile myself, but as I understand it, these pause periods of 0.0007ms may seem small, but they are proportional to the heap size, which is tiny for this tic-tac-toe toy program, so there are real heaps and pause times will be an order of magnitude larger.

+4
Dec 19 '10 at 20:08
source share

You may be interested in the commercial game Haskell, Nikki, and robots released in 2011 by Joyride Labs.

enter image description here

They don't seem to have a problem with the garbage collector.

+4
May 12 '11 at 2:57
source share



All Articles