Message108945
It is both space and time optimization.
Fred was a proponent of small pickle sizes in the past, so I am adding him to the nosy list.
I am not too keen on this to happen, though. It just seemed more natural to me not to create an empty list to unpickle an empty set.
By the same logic, allowing set() as an alternative to set([]) in python code is "premature optimization".
The patched code is a bit cleaner than the original without goto's and unnecessary XDECREFs. (I am not sure what the latest word on redundant initializations is, so I kept =NULLs intact.)
On the other hand collections.deque does not optimize empty case either. |
|
Date |
User |
Action |
Args |
2010-06-29 20:11:01 | belopolsky | set | recipients:
+ belopolsky, fdrake, mark.dickinson, pitrou, alexandre.vassalotti |
2010-06-29 20:11:01 | belopolsky | set | messageid: <1277842261.19.0.784416341252.issue9120@psf.upfronthosting.co.za> |
2010-06-29 20:10:59 | belopolsky | link | issue9120 messages |
2010-06-29 20:10:58 | belopolsky | create | |
|