Issue 20002: Cleanup and microoptimize pathlib (original) (raw)

Created on 2013-12-16 19:49 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pathlib_cleanup.patch serhiy.storchaka,2013-12-16 19:49 review
pathlib_cleanup_compatible.patch serhiy.storchaka,2013-12-16 21:49 review
Messages (8)
msg206357 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-12-16 19:49
Here is a patch which contains many small cleanups and optimizations for the pathlib module. Not all of them can be backported to 2.7 version.
msg206365 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-12-16 20:26
Ok, since it makes backporting more tedious, I'd rather keep this for post-3.4.
msg206375 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-12-16 21:49
Here is compatible with 2.7 part of the patch. It is important to apply it before 3.4 release otherwise supporting different versions will be more tedious.
msg206376 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-12-16 21:50
> Here is compatible with 2.7 part of the patch. It is important to > apply it before 3.4 release otherwise supporting different versions > will be more tedious. Do you have performance numbers that show a significant improvement?
msg206377 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-12-16 22:06
> Do you have performance numbers that show a significant improvement? No. The benefit is too small (but theoretically it should be). Some changes also simplify the code. This is why this patch should be applied now, while pathlib code is not frozen yet. For example "drv or root" replaced by "root or drv" because drv is always false on Unix and both arguments of "or" should be evaluated. This is very tiny optimization, but it has zero cos if apply it right now.
msg231645 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-11-25 09:15
If you are not interested in any of proposed changes Antoine, this issue can be closed.
msg231646 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-11-25 09:21
Not really, sorry.
msg369789 - (view) Author: Ram Rachum (cool-RR) * Date: 2020-05-24 11:29
Antoine: Serhiy linked me to this issue when I opened #40753 . Do you think that this patch by Serhiy could now be merged?
History
Date User Action Args
2022-04-11 14:57:55 admin set github: 64201
2020-05-24 11:29:06 cool-RR set nosy: + cool-RRmessages: +
2014-11-25 11:42:09 serhiy.storchaka set resolution: rejectedstage: patch review -> resolved
2014-11-25 09:21:25 pitrou set status: pending -> closedmessages: +
2014-11-25 09🔞29 serhiy.storchaka set status: open -> pending
2014-11-25 09:15:02 serhiy.storchaka set messages: +
2013-12-16 22:06:59 serhiy.storchaka set messages: +
2013-12-16 21:50:31 pitrou set messages: +
2013-12-16 21:49:27 serhiy.storchaka set files: + pathlib_cleanup_compatible.patchmessages: +
2013-12-16 20:26:56 pitrou set messages: + versions: + Python 3.5, - Python 3.4
2013-12-16 19:49:49 serhiy.storchaka create