[m-dev.] FYI: cell cache

Ralph Becket rbeck at microsoft.com
Fri Sep 29 02:48:34 AEDT 2000


>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;
- if MR_cell_cache[size] == NULL, try MR_cell_cache[size + 1] (I
presume size is in Words?);
- see how much improvement do we get over, e.g. the benchmarks used to
generate those performance results, yea many years ago;
- see if inlining the C make much of a difference;
- put the test for size <= MR_MAX_CACHED_CELL_SIZE at the call site
rather than in MR_get_cached_cell, in case size is known at compile
time (mind you, inlining should do just as well).

Ralph

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 

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