[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slowdown in switch to card-based collector?

From: Michael Livshin
Subject: Re: Slowdown in switch to card-based collector?
Date: 26 Oct 2000 21:02:35 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (20 Minutes to Nikko)

Mikael Djurfeldt <address@hidden> writes:

> => The major cause seems to be a 7-8% slowdown of the garbage
>    collector.

it is said that theoretical physicists can plausibly explain any
experimental finding, even if the experiment is later shown to have
been conducted sloppily (in which case they go "ha, but of couse!" and
plausibly explain the corrected outcome).

most programmers are the same when it comes to memory-related
performance figures, so take what I say below with due scepticism.

with that out of the way...

the reason for the slightly better performance of the card-based
collector on a toy load is that it writes to a smaller number of pages 
during the mark phase, which keeps cache happier.

for larger heaps, the cache is extremely unhappy anyway, so other
factors start to matter -- like the fact that the heap is a little
larger due to the card overhead, or the fact that the mark bits are
now not in the same CPU cache line with the corresponding cells, etc.

so the card-based allocation is hardly a big win all by itself.  the
real win lies in the more advanced optimizations that is makes
possible, like lazy sweeping.  which I can't seem to get around to
implement, being either too busy or distracted.  it's very easy,

A true Klingon Warrior does not comment his code!
                                        -- Klingon Programmer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]