GC overhead (Re: GCC 3.3, GCC 3.4)

Matt Austern austern@apple.com
Mon Feb 3 22:53:00 GMT 2003


On Monday, February 3, 2003, at 02:41  PM, Matt Austern wrote:

>
> On Monday, February 3, 2003, at 02:30  PM, Geoff Keating wrote:
>>> Matt Austern at Apple did similar experiment by using ggc 
>>> placeholder.
>>> (same interface as ggc, no collection, allocate memory using mmap in
>>> chunks and
>>> satisfy memory allocation requests from these chunks etc..).
>>>
>>> He got around ~12% speedup for sample c++ source.
>>
>> To be precise, Matt found that the speedup of using the ggc
>> placeholder was about equivalent to the speedup of using ggc-page but
>> disabling garbage collection.  This contradicts the results that Tim
>> Josling got above.
>
> Yes.  That's why I haven't been pushing to have a mode in which
> gc is entirely removed: my measurements suggest that the most
> important way in which gc introduces overhead is the most obvious
> one: the collection phase itself takes time.
>
> (Insert usual disclaimers about a single measurement not necessarily
> being representative, independent replication of results being
> important, the possibility of subtle effects on overall design of
> the compiler, etc.)

Oh, and there's one specific disclaimer I should make, as well as
the usual ones: my measurements didn't use PCH, because writing a
new allocator that conforms to the ggc interface is *much* easier
if you're only using it in the non-PCH case.

This is an important disclaimer because the memory usage, and the
profile in general, looks very different in the PCH and the non-
PCH cases.  That's the main reason I use the word "suggests"
instead of "proves".  Doing an experiment like this for the PCH
case might be interesting.

			--Matt



More information about the Gcc mailing list