-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
GH-101362: Optimise PurePath(PurePath(...)) #101667
Merged
miss-islington
merged 8 commits into
python:main
from
barneygale:gh-101362-use-native-pathlib-joining
Mar 5, 2023
Merged
GH-101362: Optimise PurePath(PurePath(...)) #101667
miss-islington
merged 8 commits into
python:main
from
barneygale:gh-101362-use-native-pathlib-joining
Mar 5, 2023
Commits on Feb 7, 2023
-
pythonGH-101362: Optimise PurePath(PurePath(...))
The previous `_parse_args()` method pulled the `_parts` out of any supplied `PurePath` objects; these were subsequently joined in `_from_parts()` using `os.path.join()`. This is actually a slower form of joining than calling `fspath()` on the path object, because it doesn't take advantage of the fact that the contents of `_parts` is normalized! This reduces the time taken to run `PurePath("foo", "bar") by ~20%, and the time taken to run `PurePath(p, "cheese")`, where `p = PurePath("/foo", "bar", "baz")`, by ~40%.
Configuration menu - View commit details
-
Copy full SHA for b01c352 - Browse repository at this point
Copy the full SHA b01c352View commit details
Commits on Feb 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6db6d55 - Browse repository at this point
Copy the full SHA 6db6d55View commit details
Commits on Feb 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1b9e2d3 - Browse repository at this point
Copy the full SHA 1b9e2d3View commit details
Commits on Mar 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for bee1ab5 - Browse repository at this point
Copy the full SHA bee1ab5View commit details -
Apply suggestions from code review
Co-authored-by: Alex Waygood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 37be083 - Browse repository at this point
Copy the full SHA 37be083View commit details -
Update Misc/NEWS.d/next/Library/2023-02-07-22-20-32.gh-issue-101362.J…
…lk6mt.rst Co-authored-by: Alex Waygood <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 782a940 - Browse repository at this point
Copy the full SHA 782a940View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ecae3d - Browse repository at this point
Copy the full SHA 0ecae3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for fbfeedb - Browse repository at this point
Copy the full SHA fbfeedbView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.