This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients alex, benjamin.peterson, brett.cannon, christian.heimes, gregory.p.smith, neologix, pitrou, rhettinger, scoder, serhiy.storchaka
Date 2013-03-06.12:37:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1362573437.05.0.906329883469.issue17338@psf.upfronthosting.co.za>
In-reply-to
Content
Gregory, thanks. :) 

By the way CPython's list type does more than log(N) resize ops:

$ ./listresize.py 10 100 1000 10000 100000
10 list.append() do 4 resize ops.
100 list.append() do 11 resize ops.
1000 list.append() do 28 resize ops.
10000 list.append() do 47 resize ops.
100000 list.append() do 66 resize ops.

I suspect that hash types (dict, set) could gain even more speed as it eliminates the need for rehashing. It's more costly than memcpy() inside realloc().

I understand the proposal as a power user tool. Most people don't need a pneumatic hammer, an ordinary hammer suffices. But in some cases you need a tool with more power. "CPython doesn't gain much from the new API, let's not add it to Python" isn't nice to other implementations that may benefit from it.
History
Date User Action Args
2013-03-06 12:37:17christian.heimessetrecipients: + christian.heimes, brett.cannon, rhettinger, gregory.p.smith, pitrou, scoder, benjamin.peterson, alex, neologix, serhiy.storchaka
2013-03-06 12:37:17christian.heimessetmessageid: <1362573437.05.0.906329883469.issue17338@psf.upfronthosting.co.za>
2013-03-06 12:37:17christian.heimeslinkissue17338 messages
2013-03-06 12:37:16christian.heimescreate