[m-dev.] Version arrays - improved results

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


I ran the test through the profiler and observed that three cells were
being allocated on every version array update.  I rewrote the low-level
version array stuff in C and obtained real looking improvements (these
run-times aren't as long as they might be, but I want to go home and
report them anyway.)  Observe that version arrays win over maps very
quickly with the new implementation.

-- Ralph



REVERSALS (50% reads, 50% writes, reasonably cache hostile)

benchmark: 10000000 reversals of 1 items
map array time:      5599ms
version array time:  6960ms  ratio: 0.80
ordinary array time:  970ms  ratio: 7.17

benchmark: 1000000 reversals of 10 items
map array time:      11530ms
version array time:  3560ms  ratio: 3.24
ordinary array time:  450ms  ratio: 7.90

benchmark: 100000 reversals of 100 items
map array time:      16140ms
version array time:  3260ms  ratio: 4.95
ordinary array time:  440ms  ratio: 7.39

benchmark: 10000 reversals of 1000 items
map array time:      23570ms
version array time:  3270ms  ratio: 7.21
ordinary array time:  430ms  ratio: 7.59

benchmark: 1000 reversals of 10000 items
map array time:      35140ms
version array time:  2100ms  ratio: 16.73
ordinary array time:  440ms  ratio: 4.76

benchmark: 100 reversals of 100000 items
map array time:      42030ms
version array time:  1930ms  ratio: 21.77
ordinary array time:  450ms  ratio: 4.28



SUMMATION (100% reads, cache friendly)

benchmark: 100000000 summations of 1 items
map array time:      7439ms
version array time:  4100ms  ratio: 1.81
ordinary array time: 2570ms  ratio: 1.60

benchmark: 10000000 summations of 10 items
map array time:      17870ms
version array time:  3880ms  ratio: 4.60
ordinary array time: 2430ms  ratio: 1.60

benchmark: 1000000 summations of 100 items
map array time:      31330ms
version array time:  3730ms  ratio: 8.40
ordinary array time: 2330ms  ratio: 1.60

benchmark: 100000 summations of 1000 items
map array time:      46720ms
version array time:  3750ms  ratio: 12.46
ordinary array time: 2310ms  ratio: 1.62

benchmark: 10000 summations of 10000 items
map array time:      65490ms
version array time:  7240ms  ratio: 9.04
ordinary array time: 2300ms  ratio: 3.15

benchmark: 1000 summations of 100000 items
map array time:      90490ms
version array time:  3760ms  ratio: 24.06
ordinary array time: 2340ms  ratio: 1.61

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