[plt-scheme] Some thoughts about GC and realtime aplications

From: Ivan Boulanov (l00bis at mail.ru)
Date: Fri May 19 14:09:00 EDT 2006

Thank you for all your answers. You gave me very interesting information and 
I wonder why all these references have not been yet included to Scheme Wiki. 
It is a very, very interesting things especially for a little (beginner) 
schemer.

Joe Marshall wrote:
>3.  Modern computers have *lots* of RAM.
If we treat such a techinical things relatively, we come to conclusion that 
there is no relative advantage for modern PCs over ancient ones. The more 
RAM amount and CPU time we get, the more we waste. It is a banality. The 
question is how competitive would be a game with GC to those that use manual 
memory management? Modern big games (The Elder Scrolls III, Doom 3 etc.) 
have a very strong demands on how fast resources have to be allocated and 
how fast have to be freed. Modern games can not allow to waste a huge amount 
of RAM just because GC techique requires this. I think there really have to 
be a hybrid high-performance approach. I should consult the given 
references.

And also you wrote:
>> A completely different approach is to use reference-counting instead of 
>> GC.
>> This approach is similar to the modern C++ programming approach of smart
>> pointers.
>
>This, I think, is the wrong approach.  If you trace a program that
>uses reference
>counts, you'll notice that it spends a good chunk of time incrementing and
>decrementing the refcounters.  This is spread rather evenly throughout the
>program, so it doesn't introduce noticable pauses, but it does take up 
>processor
>time.
I don`t really believe in that because I use smart pointers (read as 
"reference counting") everywhere I can and there is only a negligible 
overhead over raw pointers. Maybe I miss something?

PS Excuse me If I sent something twice (or wrong). 



Posted on the users mailing list.