[m-dev.] for review: direct reuse

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Sep 22 12:20:10 AEDT 2000


On 21-Sep-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> 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.

I strongly agree. This is one example where keeping constant factors low
is more important that big-O complexity.

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

Yes. However, in the far future (say three years from now ;-), it may be
possible for the compiler to analyze the program and some profile data,
find out where non-uniform cell sizes are limiting reuse, and automatically
modify its internal type definitions to *make* the cell sizes uniform
(on at least some of the function symbols in the type) if doing so would
gain more than it loses.

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