Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
GH-112727: Speed uppathlib.Path.absolute()
#112728
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Use `_from_parsed_parts()` to create a pre-joined/pre-parsed path, ratherthan passing multiple arguments to `with_segments()`
barneygale commentedDec 4, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
1.5x speedup for paths with tail segments:
It would be interesting to also test the performance of |
Big speedups on Windows! On
With PR:
(Timings done using a reasonably fresh PGO-optimised build) |
I can also repro all your reported speedups from#112728 (comment)! |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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.
LGTM
Thanks tons! |
Use `_from_parsed_parts()` to create a pre-joined/pre-parsed path, ratherthan passing multiple arguments to `with_segments()`Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Use `_from_parsed_parts()` to create a pre-joined/pre-parsed path, ratherthan passing multiple arguments to `with_segments()`Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
Use
_from_parsed_parts()
to create a pre-joined/pre-parsed path, rather than passing multiple arguments towith_segments()
pathlib.Path.absolute()
#112727