diff options
author | Barney Gale <barney.gale@gmail.com> | 2023-11-17 16:58:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-17 16:58:17 (GMT) |
commit | 9fb0f2dfeed6cf534b0188154e96b976d6a67152 (patch) | |
tree | 28939f620b2ae9d435cfa486518db90482d0c03c /Python/fileutils.c | |
parent | 25538c72d14a9fe249d1ff279eefa0ef3ab7bee2 (diff) | |
download | cpython-9fb0f2dfeed6cf534b0188154e96b976d6a67152.zip cpython-9fb0f2dfeed6cf534b0188154e96b976d6a67152.tar.gz cpython-9fb0f2dfeed6cf534b0188154e96b976d6a67152.tar.bz2 |
GH-110109: Speed up `pathlib._PathBase.resolve()` (#110412)
- Add fast path to `_split_stack()`
- Skip unnecessarily resolution of the current directory when a relative
path is given to `resolve()`
- Remove stat and target caches, which slow down most `resolve()` calls in
practice.
- Slightly refactor code for clarity.
Diffstat (limited to 'Python/fileutils.c')
0 files changed, 0 insertions, 0 deletions