texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Re: Contributing to TeXmacs: garbage collector


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Re: Contributing to TeXmacs: garbage collector
Date: Mon, 16 Jan 2006 21:46:18 +0100
User-agent: Mutt/1.5.9i

On Mon, Jan 16, 2006 at 07:00:37PM +0100, David MENTRE wrote:
> [ Disclaimer: I don't want to start a flame on GC, just add some
>   additional information. ]
> 
> Joris van der Hoeven <address@hidden> writes:
> 
> > Currently, most objects are tree-like structures with reference counting.
> > As long as objects are really trees, reference counting is probably
> > the best strategy.
> 
> Well, reference counting adds an overhead on all pointer handling
> operations, as well as additional memory (and thus cache) use. I made
> this explicit with some profiling some time ago.

The time overhead could be reduced by adding some const& stuff,
at least for the most common data types. David Allouche reported
a 10% to 15% gain in performance when doing this.

Contrary to what could be thought, the cache use is very good for
the current memory allocation scheme, because we use a separate
linked list for objects of different small sizes. Hence,
deleted objects are often reallocated at the same place,
statistically speaking. That is one of the major reasons
why Boehm's GC does not improve anything in my opinion.

> That's said, David Allouche tried a long time ago to add Boehm GC to
> TeXmacs but this operation failed to add any performance improvement
> (memory use was increased by a factor of 1.5 or 2). But maybe Stijn and
> Niels can add a more efficient GC?

I also noticed on another project that Boehm's GC is not reliable.
I think that this is the main point where a GC might help.

Best wishes, Joris




reply via email to

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