-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cached_ids
not implemented?
#69
Comments
I got stuck there and never got the cache to work. Have to revisit it completely. It should improve search performance significantly |
@MrVPlusOne this is a very stupid optimization that I didn't consider. If the pattern to be searched is a literal, we just know where it is due to the egraph hashcons. |
function cached_ids(g::EGraph, p::Pattern)# ::Vector{Int64}
collect(keys(g.classes))
end
function cached_ids(g::EGraph, p) # p is a literal
[lookup(g, ENodeLiteral(p))]
end |
Same happens if the pattern is a ground term (no variables). So it can only reside in a single eclass. |
Any ideas on this one? |
I'm actually quite busy with my Ph.D. graduation lately, so I probably won't have the bandwidth to work on this. Feel free to close the issue if you have other plans for MetaTheory! |
Implemented in #177 |
Hi,
I noticed that
cached_ids
in line 18 ofsearch.jl
is currently returning all the classes of the e-graph, and there is some code inside the body that got commented out. I'm currently trying to do some batch simplification for a program synthesis application and am experiencing very poor saturation performance, with the majority of the time spent on the "Search" part according to the report. So I'm wondering, could this be the main cause? If so, can this be fixed in the future?Thanks!
The text was updated successfully, but these errors were encountered: