On Wed, 12 Feb 2003, Einar Karttunen wrote:
> On 12.02 04:01, Mathieu Bouchard wrote:
> > However, I wonder whether
> > there's a patch that I could apply to Ruby (1.6.8 or 1.8.0) that would
> > improve the "realtimeness" of Ruby in any way. Specifically, I mean
> > anything that would make the worst-case duration of a GC interruption
> > smaller.
> However you need to be aware that realtime and generational GC are for
> different purposes. A generational GC reduces the average time it takes
> to sweep, while a real time collector makes guarantees about the
> worst-case. I haven't heard of any real-time collector for Ruby.

Now that I think of this some more...

I have to generate video frames at a rate as constant as possible. I want
a time-histogram to be as skewed as possible towards the low end. It is
not much of a problem if there's a longer stop once in a while as long as
it stays quite rare. My requirement is not hard-realtime, but it still is
quite close to it.

The problem is more about frames in which GC occur vs frames in which GC
doesn't occur. So I should concentrate more in reducing the occurrence of
object creations. However it's still nice to be able to reduce the impact
of every GC.

What are typical speed improvements using a generational GC ? (in
particular, using that patch)

> 1) http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/9990

Thanks, however i can't read japanese, and the embedded URLs to the actual
patch are broken. Going up to that person's homepage i could find the GC
patch done against 1.7.1. (but... looking at it briefly, I doubt I can
apply it to current versions of Ruby)

________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju