bpo-36229: Avoid unnecessary copies for list, set, and bytearray ops. by brandtbucher · Pull Request #12226 · python/cpython
added 4 commits
March 7, 2019 12:49If a list, set, or bytearray object's refcount is exactly one, binary operations delegate to their in-place counterparts, rather than creating expensive copies.
This still tests that the list constructor efficiently allocates space... it just might not be *exactly* the same size as the given example, as was implied before.
brandtbucher
changed the title
bpo-36229: Linear-time ops for some mutable collections.
bpo-36229: Linear-time list, set, and bytearray ops.
brandtbucher
changed the title
bpo-36229: Linear-time list, set, and bytearray ops.
bpo-36229: Avoid unnecessary copies for list, set, and bytearray ops.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters