[m-dev.] Version arrays

Ralph Becket rafe at cs.mu.OZ.AU
Tue Jan 27 11:19:31 AEDT 2004


Zoltan Somogyi, Tuesday, 27 January 2004:
> On 23-Jan-2004, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> > Here is a more comprehensive set of results.  The first set of tests is
> > for repeated reversals of an array of ints, the second set is for
> > repeated summations of an array of ints.  Version arrays do better than
> > maps once 100 items or thereabouts are involved.
> 
> Tests like this are very sensitive to the operation mix, in this case
> the ratio of lookups, insertions and updates. What was the mix in these
> tests, and how do these relate to the mixes on various data structures
> in the compiler?

The reversal benchmark works by swapping the items at two indices (i.e.
two array reads and two updates) then moving the indices in towards each
other, starting from opposite ends of the array.  So this test performs
50% reads and 50% writes.

The summation benchmark simply reads each item in turn from an array and
keeps the tally in an accumulator, so this test performs 100% reads.

I could knock up a test that performed 100% writes if you think that
might provide useful information.

As for data structure use in the compiler, I've no idea.  I hear
someone's been working on a profiler for this sort of thing, however :-)

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