[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Garbage Collector Cost
- From: "Juris Kalnins" <juris@...>
- Date: Wed, 27 Oct 2010 08:39:58 +0300
On Wed, 27 Oct 2010 04:45:32 +0300, Alex de Magalhães Machado
I really think it could be someone's thesis to make useful, but right now
I'm just worried about assuring predictability.
If you can say it has a quadratic performance, then you can predict the
garbage collection execution time (e.g. you can consider it always has
It's from this paper, a very good read on Lua GC:
Using this time and taking into account other variables,
developers can determine a worst case execution time for each one of
applications, and that is hard real time, even if it's not high
So, are these corner cases predictable?
Most corner cases are either from ephemerons (tables with weak keys),
or from userdata finalization (which is done in a delayed fashion and
can release additional resources, so that running full GC cycle does
not guarantee that all garbage gets collected)
If the script is short lived, and turning GC completely off is
an acceptable option, it's the most predictable way. It is possible then to
run full GC manually at known times.