[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm merging this not so much because of the performance aspect, but just to remove some unnecessary code. But in any event, thanks for the contribution! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed _

[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 4a85718212fd032c922ca7d630b2602dd4b29a35 by kfollstad in branch 'master': bpo-43970: Optimize Path.cwd() in pathlib by not instantiating a class unnecessarily (GH-25699) https://github.com/python/cpython/commit/4a85718212fd032c922ca7d630b2602dd4

[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Kevin Follstad
Change by Kevin Follstad : -- keywords: +patch pull_requests: +24388 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25699 ___ Python tracker ___ _

[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Kevin Follstad
New submission from Kevin Follstad : python3.10 -m timeit -r 5 -n 10 -s 'from pathlib import Path' 'Path.cwd()' 10 loops, best of 5: 206 usec per loop python3.10-mypatch -m timeit -r 5 -n 10 -s 'from pathlib import Path' 'Path.cwd()' 10 loops, best of 5: 156 usec per loop