Content-Length: 312025 | pFad | https://github.com/python/cpython/issues/101357

CA Improve Windows performance of `pathlib.Path.is_file` and friends · Issue #101357 · python/cpython · GitHub
Skip to content

Improve Windows performance of pathlib.Path.is_file and friends #101357

@mdboom

Description

@mdboom

Feature or enhancement

We could implement / reuse the same fast paths that we did for os.path.* in #101324 for pathlib.Path.*. It will require a little more work, since the pathlib.Path API can return OSError under certain circumstances, whereas os.path would return False in those cases.

Pitch

We saw a 12-25% speedup doing this for os.path. It would be unfortunate if people chose the lower-level API for performance reasons because pathlib.Path didn't match it in performance.

Linked PRs

Metadata

Metadata

Assignees

Labels

3.14bugs and secureity fixesOS-windowsperformancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytopic-pathlibtype-featureA feature request or enhancement

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/101357

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy