[m-dev.] FYI: cell cache

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


On 28-Sep-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> >From Peter Ross on 28/09/2000 16:30:52
> > > 
> > I wasn't sure if it would be a win, but it appears that it can be.
> > 
> That's cool.  Some thoughts:
> - rather than having MR_get_cached_cell return NULL on failure, do
> the malloc and return that instead, obviating the need for a test for
> a cache miss at the call site;

That's a nice idea.

I think currently Pete's change only does this for the MLDS back-end,
but if it turns out to improve performance, we could also do this
change for the LLDS back-end.

But there is one complication: if we use Ralph's suggestion here, to
make it all work on the SPARC in LLDS grades that uses gcc global
registers (e.g. `asm_fast'), you would need to call
save_transient_hp() and restore_transient_hp() twice each (once in the
caller and once in the callee), since otherwise the heap pointer
won't be valid when you do the incr_hp().
With the current inefficient implementation of save_transient_hp()
that just calls save_transient_regs(), this would cost quite a lot, so
you'd get a definite slowdown in that case.

> - see how much improvement do we get over, e.g. the benchmarks used to
> generate those performance results, yea many years ago;

Also see how much improvement we get when running the compiler.

Also instrument the cache so that if memory profiling is enabled,
it records how many cache hits and cache misses you get for each size.

-- 
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