-
Notifications
You must be signed in to change notification settings - Fork 116
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
Severe performance regression in 1.8.6 #294
Comments
@joankaradimov I guess this commit causes this problem. I'll take a look at it some time this weekend. Thanks for catching the serious problem! |
In that case I think it might be this line. There are multiple This improves the situation a little bit, but it does not resolve it completely. The performance is still worse than 1.8.5. A much better solution would be to get rid of the std::map<std::string, Info, std::less<>> dic_; ... to use case-insensitive comparisons instead of |
@joankaradimov could you check performance with the latest peglib.h in the master branch? If you confirm that it fixes the performance regression, I'll bump the version to 1.8.8. Thanks! |
@yhirose I can confirm the problem is fixed. From ~10 seconds previously down to below 50 ms now. |
It's now included in v1.8.8. Thanks for your fine contribution! |
Thank you for the quick responses and fixes! |
@yhirose - Thanks for this. Are you responsible for the vcpkg? That's still sitting at 1.8.6. |
@joankaradimov no. I don't know who are working on vcpkg, or other package managers like conan. |
I'm running this grammar:
https://github.com/joankaradimov/Magnetar/blob/master/MagnetarCraft/src/iscript_parser.cpp#L71
... with this input file:
https://raw.githubusercontent.com/neivv/aice/master/test_scripts/vanilla.txt
On v1.8.5 I'm observing parse times of below 1 second. On 1.8.6 it's above 10 seconds.
Similarly -- on the web playgound I was running identical examples for under 150 ms the previous week. I'm assuming the version over there was updated these last couple of days, since the execution times are suddenly 1-2 orders of magnitude worse.
The text was updated successfully, but these errors were encountered: