Skip to content

Reduce allocations when tree canonizing #102

@AgentElement

Description

@AgentElement

The tree canonizer introduced by #101 requires a couple of allocations each time it is called. The allocated memory is thrown away when the canonizer exits. Given that the canonizer may be called ~10^{6-7} times for large molecules, this is not efficient.

To reduce allocations, we could implement a Canonizer struct/enum, constructed only once during the program's lifetime. Reusing the allocated memory (using the very fast .clear()/etc between calls) will likely result in a substantial improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    optimizationAn optimization to existing implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions