Skip to content

Consistency of show_dot_graph and get_num_nodes #504

Open
@majosm

Description

@majosm

A question came up while revisiting #489 with @kajalpatelinfo: should show_dot_graph be consistent with get_num_nodes, in the sense that the number of nodes displayed in the graph matches what get_num_nodes computes? It looks like show_dot_graph's code is based on CopyMapper, which ignores duplicates, but currently get_num_nodes uses id(expr) for a hash key, meaning it counts duplicates separately.

I'm tempted to think they should behave the same, at least by default. It might actually be useful to give them both an option to include/exclude duplicates? Thoughts @inducer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions