Here is the comparison with array:
a := ((1 to: 5000) collect: [ :i | i ]) asPMVector.
a sum. "Best of 10 runs: 568ms"
b := ((1 to: 25000000) collect: [ :i | i ]).
b sum. "Worst of 10 runs: 551ms"
This means that PMVector sum is at least 5,000 times slower than Collection sum.
Possible fix: Don't override sum method. Is there any specific reason to do so?
Here is the comparison with array:
This means that
PMVector sumis at least 5,000 times slower thanCollection sum.Possible fix: Don't override
summethod. Is there any specific reason to do so?