diff options
author | Barney Gale <barney.gale@gmail.com> | 2024-02-10 18:12:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-10 18:12:34 (GMT) |
commit | 6f93b4df92b8fbf80529cb6435789f5a75664a20 (patch) | |
tree | 9847e44bb89c24c38f5217dada3fdfc83344a376 /Python/pyarena.c | |
parent | 9d1a353230f555fc28239c5ca1e82b758084e02a (diff) | |
download | cpython-6f93b4df92b8fbf80529cb6435789f5a75664a20.zip cpython-6f93b4df92b8fbf80529cb6435789f5a75664a20.tar.gz cpython-6f93b4df92b8fbf80529cb6435789f5a75664a20.tar.bz2 |
GH-115060: Speed up `pathlib.Path.glob()` by removing redundant regex matching (#115061)
When expanding and filtering paths for a `**` wildcard segment, build an `re.Pattern` object from the subsequent pattern parts, rather than the entire pattern, and match against the `os.DirEntry` object prior to instantiating a path object. Also skip compiling a pattern when expanding a `*` wildcard segment.
Diffstat (limited to 'Python/pyarena.c')
0 files changed, 0 insertions, 0 deletions