[m-dev.] for review: direct reuse
Ralph Becket
rbeck at microsoft.com
Thu Sep 21 21:22:23 AEDT 2000
>From Peter Ross on 21/09/2000 11:18:38
> On Thu, Sep 21, 2000 at 02:53:04AM -0700, Ralph Becket wrote:
> >
> > which is certainly worse, except for the fact that, under the Mercury
> > scheme, having overwritten a larger cell with a smaller one, we no
longer
> > have the information that there is some extra space available if we
wanted
> > to go in the other direction.
> >
> Good point, we may end up with a cascading stream of cell reuse, where
> we progressively use less and less of the cell.
>
> It is something we should think about if there is a possible solution.
I'm not sure it's going to be that big a deal - just having sensible
structure reuse should make a real difference. I suspect that carrying
around extra information (cell size) and complicating reuse (i.e. having
run-time tests to decide whether reuse is possible due to cell size)
would kill any gains made in the first place.
Instead, if one really wants to go for 100% reuse, one should design
one's data-structures a la the C version and accept that small cells
will waste some memory. Otherwise, take reuse when you can and
otherwise let the GC do its job.
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