You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
I think get_num_nodes should be adapted to only count non-duplicates. I'm skeptical that including duplicates (at least the naive way) is useful functionality, as it could very easily have exponential complexity. As for non-naive, maybe that's useful? But it should probably not be the default.
I think get_num_nodes should be adapted to only count non-duplicates. I'm skeptical that including duplicates (at least the naive way) is useful functionality, as it could very easily have exponential complexity. As for non-naive, maybe that's useful? But it should probably not be the default.
What's naive/non-naive here? No cache vs. cache-by-id? Or something else?
A question came up while revisiting #489 with @kajalpatelinfo: should
show_dot_graph
be consistent withget_num_nodes
, in the sense that the number of nodes displayed in the graph matches whatget_num_nodes
computes? It looks likeshow_dot_graph
's code is based onCopyMapper
, which ignores duplicates, but currentlyget_num_nodes
usesid(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?
The text was updated successfully, but these errors were encountered: