-
Notifications
You must be signed in to change notification settings - Fork 132
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
Where is the time spent? #207
Comments
Thank you for the benchmark! I will see if Rust has any good profiling tools. Or if I should just use perf. |
Wow, I made a few simple changes according to some feedback from perf, and the runtime of the benchmark on my home machine went down from 1 minute to 40 seconds on the release build. I wonder what else I might be doing that's so needlessly expensive. |
Thank you for looking at this! It is worth thinking about this. When all is done, I expect a considerably improved runtime for this particular case. On the other hand, please do not get carried away with micro-optimizations: It is much more important to first get the semantics right, such as for example #95, and to implement the features that are necessary for elegant Prolog code (#192). Scryer is currently in a very good position in this sense, and I hope that maybe a few simple changes like the one you now applied will improve performance considerably for important use cases. |
For optimizing I recommend these:
|
There is probably quite a lot I can do to improve the use of the AND and OR stacks in Unsafe Rust. It might be time to merge them, I don't know. Are there benefits to keeping them separate? |
Scryer now performs completely satisfactorily in this example, so I am closing this issue, thank you a lot! |
As one benchmark, please download
edges.pl
from https://www.metalevel.at/clpb/scryer/edges.pl, and then consult the program:As a test case, post the query:
After some time, it correctly yields
Count = 211954906
, which is the number of independent sets of this graph.I hope this benchmark gives some useful indication regarding which portions of the engine are promising candidates for performance improvements.
The text was updated successfully, but these errors were encountered: