-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve performance of Path#dirname
and Path#extension
#11001
Improve performance of Path#dirname
and Path#extension
#11001
Conversation
Hmm the #extension method seems to fail some specs (appearantly not all Path specs were in path_spec.cr.. hmm) |
This looks great, really. To fix The specs are in Your code comments in |
It seems like Path#extension now properly works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please fix the spelling of occurrEnce
and sepArator
in the code comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Thank you @BlobCodes 🙏
Path#dirname
and Path#extension
This PR improves the performance of the Path#dirname and Path#extension methods.
The new methods are also smaller.
#dirname Benchmarks
#extension Benchmarks
All specs ran fine, also I tested the methods using the strings seen in the Benchmark.