[m-dev.] Version arrays

Ralph Becket rafe at cs.mu.OZ.AU
Fri Jan 23 18:09:24 AEDT 2004


I re-ran the summation tests with ten to twenty times the number of
iterations to try to get the figures up into the minute range, as per
Simon's suggestion.  The difference in the observed ratios is very
small, although maps are still winning by a small margin at the 100
items mark.

> benchmark: 100 summations of 100000 items
> bt_array time:       4730ms
> map array time:      7240ms  ratio: 0.65
> version array time:  2650ms  ratio: 2.73
> ordinary array time: 1740ms  ratio: 1.52

benchmark: 1000 summations of 100000 items
map array time:      73180ms
version array time:  28060ms  ratio: 2.61
ordinary array time: 17220ms  ratio: 1.63

> benchmark: 1000 summations of 10000 items
> bt_array time:       3960ms
> map array time:      6090ms  ratio: 0.65
> version array time:  2620ms  ratio: 2.32
> ordinary array time: 1730ms  ratio: 1.51

benchmark: 10000 summations of 10000 items
map array time:      59320ms
version array time:  27150ms  ratio: 2.18
ordinary array time: 17100ms  ratio: 1.59

> benchmark: 10000 summations of 1000 items
> bt_array time:       2510ms
> map array time:      4180ms  ratio: 0.60
> version array time:  2610ms  ratio: 1.60
> ordinary array time: 1730ms  ratio: 1.51

benchmark: 100000 summations of 1000 items
map array time:      40820ms
version array time:  27050ms  ratio: 1.51
ordinary array time: 17050ms  ratio: 1.59

> benchmark: 100000 summations of 100 items
> bt_array time:       1630ms
> map array time:      2780ms  ratio: 0.59
> version array time:  2630ms  ratio: 1.06
> ordinary array time: 1720ms  ratio: 1.53

benchmark: 2000000 summations of 100 items
map array time:      56099ms
version array time:  65450ms  ratio: 0.86
ordinary array time: 44420ms  ratio: 1.47

> benchmark: 1000000 summations of 10 items
> bt_array time:        630ms
> map array time:      1620ms  ratio: 0.39
> version array time:  2610ms  ratio: 0.62
> ordinary array time: 1770ms  ratio: 1.47

benchmark: 20000000 summations of 10 items
map array time:      32090ms
version array time:  65660ms  ratio: 0.49
ordinary array time: 44900ms  ratio: 1.46

> benchmark: 10000000 summations of 1 items
> bt_array time:        410ms
> map array time:       560ms  ratio: 0.73
> version array time:  2660ms  ratio: 0.21
> ordinary array time: 1820ms  ratio: 1.46

benchmark: 200000000 summations of 1 items
map array time:      11170ms
version array time:  65050ms  ratio: 0.17
ordinary array time: 46180ms  ratio: 1.41

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