Skip to content

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

Closed

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

Activity

  1. added this to the 0.10.0 milestone on Dec 22, 2020
  2. modified the milestones: 0.10.0, 0.10.1 on Mar 21, 2022
  3. modified the milestones: 0.10.1, on Oct 13, 2022
  4. modified the milestones: , 0.11.0 on Feb 5, 2023
  5. modified the milestones: 0.11.0, 0.13.0 on Feb 21, 2024
  6. modified the milestones: 0.13.0, 0.13.1 on Jul 7, 2026
  7. added a commit that references this issue on Nov 19, 2026
    8259647
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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