Message337727
This is an interesting idea. But I have two concerns.
1. It is hard to implement refcount-based optimization on Python implementations which do not use reference counting (i.e. PyPy). If the effect of this optimization will be significant, people will become writing a code that depends on it, and this will cause problems on other implementations.
2. Currently list1 + list2 + list3 returns a list which allocates the exact amount of memory needed to contain its content. But with the proposed changes the result list could preallocate more memory. If the result is a long living object, this can cause to wasting of memory. |
|
Date |
User |
Action |
Args |
2019-03-12 08:46:18 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, pablogsal, brandtbucher |
2019-03-12 08:46:18 | serhiy.storchaka | set | messageid: <1552380378.93.0.204838518849.issue36229@roundup.psfhosted.org> |
2019-03-12 08:46:18 | serhiy.storchaka | link | issue36229 messages |
2019-03-12 08:46:18 | serhiy.storchaka | create | |
|