summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorBarney Gale <barney.gale@gmail.com>2023-05-07 21:12:50 (GMT)
committerGitHub <noreply@github.com>2023-05-07 21:12:50 (GMT)
commitc0ece3dc9791694e960952ba74070efaaa79a676 (patch)
tree17d6baebf2f6a39e129b7e74da2ab56a029e8d16 /Python/compile.c
parent8d95012c95988dc517db6e09348aab996868699c (diff)
downloadcpython-c0ece3dc9791694e960952ba74070efaaa79a676.zip
cpython-c0ece3dc9791694e960952ba74070efaaa79a676.tar.gz
cpython-c0ece3dc9791694e960952ba74070efaaa79a676.tar.bz2
GH-102613: Improve performance of `pathlib.Path.rglob()` (GH-104244)
Stop de-duplicating results in `_RecursiveWildcardSelector`. A new `_DoubleRecursiveWildcardSelector` class is introduced which performs de-duplication, but this is used _only_ for patterns with multiple non-adjacent `**` segments, such as `path.glob('**/foo/**')`. By avoiding the use of a set, `PurePath.__hash__()` is not called, and so paths do not need to be stringified and case-normalised. Also merge adjacent '**' segments in patterns.
Diffstat (limited to 'Python/compile.c')
0 files changed, 0 insertions, 0 deletions