alt-romes / alt-romes/hegg

Parent nodes are not deduplicated

未关闭
#21 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Haskell
星标
98
派生
17
PR 合并指标
30 天内没有已合并 PR

描述

The node list is a set, so the semigroup instance automatically deduplicates. But the parents are stored as a list with cached size and after merges the list often contains duplicates. The worklist does get nubbed, so it is not catastrophic for performance, but I figured I'd mention it.

This discussion mentions nubbing the parent list as well, so it probably wasn't intentional? https://github.com/alt-romes/hegg/pull/13

Here is the relevant line:

https://github.com/alt-romes/hegg/blob/52c0143b217059f5686e45a2a4da03a8546bf205/src/Data/Equality/Graph.hs#L184

Edit: looked it up and seems like egg doesn't do it either. https://github.com/egraphs-good/egg/issues/113
Probably not crucial then, though it is a tad annoying that the graphviz graph shows them as duplicate nodes.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。