set and dict iteration

Ian Kelly ian.g.kelly at gmail.com
Mon Sep 3 15:29:35 EDT 2012


On Sun, Sep 2, 2012 at 11:43 AM, Aaron Brady <castironpi at gmail.com> wrote:
> We could use a Python long object for the version index to prevent overflow.  Combined with P. Rubin's idea to count the number of open iterators, most use cases still wouldn't exceed a single word comparison; we could reset the counter when there weren't any.

We could use a Python long; I just don't think the extra overhead is
justified in a data structure that is already highly optimized for
speed.  Incrementing and testing a C int is *much* faster than doing
the same with a Python long.



More information about the Python-list mailing list