Skip to content

add_node & neighbors methods should check node_map instead of node_ids for existing node id #301

@analog-cbarber

Description

@analog-cbarber

Searching the list of node_ids is O(N) in the # of ids. Instead, just look for the id in the hash table, which is much faster.

Also consider eliminating the node_ids array entirely and have get_nodes return node_map.keys(), which will be in the insertion order

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions