Skip to content
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-117338: Handle leading // for posixpath.realpath #117340

Closed
wants to merge 3 commits into from

Conversation

nineteendo
Copy link
Contributor

@nineteendo nineteendo commented Mar 28, 2024

Benchmark:

python -m timeit -s "from test import realpath1" "realpath1('foo/../../..')" && python -m timeit -s "from test import realpath2" "realpath2('foo/../../..')"
10000 loops, best of 5: 23.5 usec per loop # before
10000 loops, best of 5: 23.6 usec per loop # after
# -> no difference

@nineteendo nineteendo marked this pull request as ready for review March 28, 2024 20:35
@nineteendo nineteendo marked this pull request as draft March 28, 2024 21:23
@nineteendo nineteendo mentioned this pull request Mar 29, 2024
16 tasks
@nineteendo nineteendo closed this Mar 29, 2024
@nineteendo nineteendo deleted the fix-posixpath.realpath branch March 29, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant