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
Add C implementation of os.path.splitroot() #102511
Comments
|
I'd recommend making this a |
|
Sounds good. We can use Note that existing use of |
|
I'm going to attempt to implement this, though my C is rather basic so it will take me some time. Rough plan:
Let me know if that doesn't sound right! |
|
Here's an overview of what I did to experiment with this idea. I started by adding a new PyAPI_FUNC(wchar_t *) _Py_skiproot(wchar_t *path, Py_ssize_t size,
wchar_t **root);I moved the existing root-skipping implementation from I retained the old My initial comparison shows that, when splitting "//server/share/spam/eggs", the new builtin |
|
My C isn't good enough for this, so someone else please feel free to take a stab at it! |
Feature or enhancement
Speed up
os.path.splitroot()by implementing it in C.Pitch
Per @eryksun:
Previous discussion
Linked PRs
os.path.splitroot()#118089The text was updated successfully, but these errors were encountered: