-
Notifications
You must be signed in to change notification settings - Fork 52
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
Reimplement Lib/Set.hpp as a wrapper of std::unordered_set #551
Comments
I can work on it if there are no objections against the very idea. |
I'm not against the idea, just wanted to note that Vampire's |
I am very excited to see this kind of change proposed! Thanks for filing this. If you are sufficiently brave to tackle this please go ahead and try it once there are no more comments here, otherwise I will do it at some point. It may be that either
The former can probably be solved by changing how we use sets on a case-by-case basis. The latter I could forgive if the penalty is minimal, as in my experience the straight-line speed rarely translates to many solved problems. Another thorny aspect may be the |
When I last tested |
Great! Thank you for your comments. I will give it a try. |
A solution if |
I see at least one non-standard method, Line 170 in 1916f50
Kernel/Term.cpp (e.g. Line 850 in 1916f50
|
Fine by me - go straight to PR if you like, |
This is definitely a nice exercise! However, please try to approach this locally first (if at all possible - maybe focusing on an expected hot spot), so that you don't spend too much time on it, before we can compare the performance. I wouldn't be too happy to accept a large refactor which on top of things slows Vampire down a bit, just to be closer to using standard classes. |
Why?
And why have original basic container implementations instead of standard ones?
Why not replace Vampire's set with
std::unordered_set
?Many more changes at once. This issue proposes to begin with only one file (
Lib/Set.hpp
).We have Vampire's set rewritten as a wrapper around
std::unordered_set
, so what?We can replace the wrapper's methods calls with standard ones of the wrapped set case by case wherever they appear in the code (some parts might need more effort to refactor than others). Ideally, this process ends with a total replacement of the original implementation by the standard.
We can also encourage new code to use standard sets.
If such an approach works, we can do the same with other containers.
Why start with sets?
We already have unit tests for this class.
The text was updated successfully, but these errors were encountered: