[m-dev.] FYI: cell cache

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Sep 29 20:57:23 AEDT 2000


On 28-Sep-2000, Peter Ross <petdr at miscrit.be> wrote:
> Hi,
> 
> I don't intend to check this in as it is a very quick and dirty hack for
> testing an idea of mine.
> 
> Any comments about the idea appreciated.

If you want to try this kind of thing, you should compare it with using
the Boehm gc's free lists, via explicit calls to GC_FREE() and using
`-DINLINE_ALLOC' to inline the GC_MALLOC() allocation code.

The drawback of -DINLINE_ALLOC is a big increase in code size.
The main advantage is that the code is specialized for the allocation size.
We could get the best of both worlds by defining routines
MR_GC_MALLOC_1_WORDS(), MR_GC_MALLOC_2_WORDS(), ..., MR_GC_MALLOC_10_WORDS(),
that would call the inline macro GC_MALLOC_WORDS() to allocate the
specified number of words.  This would probably be a significant win.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list