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 anthony shaw
Recipients Aaron Hall, anthony shaw, methane, ncoghlan, ronaldoussoren, serhiy.storchaka
Date 2019-04-08.11:47:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554724068.4.0.0519810762817.issue36551@roundup.psfhosted.org>
In-reply-to
Content
> This patch makes it slow for small iterators

That is a one-off cost for the __length_hint__ of the range object specifically.
Objects with a known length (lists, sets, tuples) would not have that overhead.

I can run a more useful set of benchmarks against this.

So the +0.6us would be the same for ranges 8-16. Then less for 16-25, then again for 25-35 as the removal of the reallocation process has a more significant factor for larger ranges.
History
Date User Action Args
2019-04-08 11:47:48anthony shawsetrecipients: + anthony shaw, ronaldoussoren, ncoghlan, methane, serhiy.storchaka, Aaron Hall
2019-04-08 11:47:48anthony shawsetmessageid: <1554724068.4.0.0519810762817.issue36551@roundup.psfhosted.org>
2019-04-08 11:47:48anthony shawlinkissue36551 messages
2019-04-08 11:47:48anthony shawcreate