Skip to content

Runtime of PopulationView.id_to_index() has > n^2 scaling with number of cell parameters #693

@AvidusMauch

Description

@AvidusMauch

PopulationTest.test_scaling_cellparams_id_to_index from #691 shows that PopulationView.id_to_index() scales > n^2.
relevant line a58cc51#diff-fb732f5879c60a0dc39fffe1a1bb8fbc45c3299c0197baec8e942cf69b871df5R110
The line of code where most time is spent is

result = numpy.where(self.all_cells == id)[0]

if IDMixin is not assignend its Population as parent this scaling is not observed
As Population.id_to_index()'s implementation does not use numpy.where() it also does not scale with number of cell parameters

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions