-
Notifications
You must be signed in to change notification settings - Fork 74
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
Cache the results of match, validate, and compare #91
base: master
Are you sure you want to change the base?
Conversation
Thanks for the feedback! Do you have some performance measurement or a typical test case? |
Running 10k matches (same string) on the current version completes in about 0.759s. Below are the top contributors (
|
Ran into another case where |
I've found that calling `semantic_version.match(...)` quickly becomes the performance bottleneck in tight loops, forcing me to wrap it in another function that I can put behind an `lru_cache`. I propose working into the package permanently.
I've found that calling
semantic_version.match(...)
quickly becomes the performance bottleneck in tight loops, forcing me to wrap it in another function that I can put behind anlru_cache
. I propose working into the package permanently.