Skip to content

PMVector sum is extremely slow #125

@AtharvaKhare

Description

@AtharvaKhare

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions