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 serhiy.storchaka
Recipients pitrou, serhiy.storchaka, vstinner
Date 2013-11-14.15:26:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384442798.77.0.691253218065.issue19581@psf.upfronthosting.co.za>
In-reply-to
Content
Many collections in other programming languages use overallocating rate 100%. Perhaps overallocating rate 12.5% for Python lists is good compromise between speed and memory usage (as far as Python lists have no explicit resize method), but for short-living objects we can use larger overallocating rate.

In theory for overallocating rate r long list needs in average O(1/log(1+r)) reallocations and O((r+1)/r) copyings per element. I.e. 50% overallocating rate is 3-3.4 times more efficient than current 12.5% overallocating rate and 100% overallocating rate is 1.5-1.7 times more efficient than 50% overallocating rate (in terms of numbers of reallocations and copyings).

I'm interesting what will happened when increase overallocating rate (50% or 100%) for PyAccu.
History
Date User Action Args
2013-11-14 15:26:38serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner
2013-11-14 15:26:38serhiy.storchakasetmessageid: <1384442798.77.0.691253218065.issue19581@psf.upfronthosting.co.za>
2013-11-14 15:26:38serhiy.storchakalinkissue19581 messages
2013-11-14 15:26:38serhiy.storchakacreate