Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> Dan Sugalski <[EMAIL PROTECTED]> wrote:

>> *) Lay in a generational garbage collector.

> Good for that degenerated case, probably, but see below.

A generational GC still has to mark the root set and the old
generation's objects. So it wouldn't be of any help with the degenerated
case.

$ parrot -p 10m.pasm 1e6

 CODE J OP FULL NAME            CALLS  TOTAL TIME   AVG T. ms
 ---- - -----------------    --------  ----------  ----------
   -5   DOD_mark_next              21    1.244545     59.2640
  751 j new_p_ic              1000001    0.357744      0.0004
  935 j set_p_ki_p            1000000    0.294898      0.0003
   -4   DOD_collect_PMC            21    0.191554      9.1216

DOD_mark_next is from marking the root set, i.e. the array.
DOD_collect_PMCs is that part, that could profit from a generational
approach. But ...

$ parrot -p 10m.pasm 2e6

 CODE J OP FULL NAME            CALLS  TOTAL TIME   AVG T. ms
 ---- - -----------------    --------  ----------  ----------
   -5   DOD_mark_next              40    4.751935    118.7984
   -4   DOD_collect_PMC            40    0.750301     18.7575
  751 j new_p_ic              2000001    0.687316      0.0003

... as you can see, the collection phases are still linear in execution
time and collection is fast. The accumulated DOD run counts + ever
increasing DOD times together give a nice quadratic slow down:

$ parrot -p 10m.pasm 3e6

 CODE J OP FULL NAME            CALLS  TOTAL TIME   AVG T. ms
 ---- - -----------------    --------  ----------  ----------
   -5   DOD_mark_next              59   10.502405    178.0069
   -4   DOD_collect_PMC            59    1.667929     28.2700


leo

Reply via email to