Skip to content

Simplify should not allocate memory for the idmap #314

Closed
@molpopgen

Description

@molpopgen

Right now, we allocate a new vector each time. This is not efficient and can matter in the forward simulation case.

Instead:

  • The structs should store the vector
  • resize it if idmap == true
  • Return Option<[NodeId]> instead of the vector.

This proposal is a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    API breakingIssues/PRs that may break API.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions