[issue21988] Decrease iterating overhead in timeit

Steven D'Aprano report at bugs.python.org
Wed Jul 16 18:43:00 CEST 2014


Steven D'Aprano added the comment:

On Wed, Jul 16, 2014 at 02:49:31PM +0000, Armin Rigo wrote:
> ...but I don't think PyPy should be by itself a good enough reason to 
> reject this patch.  It would be fine if timeit detects which 
> interpreter it runs on, and only tries to unroll on CPython, for 
> example.

I would *much* rather a parameter to timeit which controls whether or 
not to unroll, rather than timeit trying to guess whether you want it to 
unroll or not. PyPy can default to off, CPython to on, and other 
implementations can choose whichever default makes sense for them.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21988>
_______________________________________


More information about the Python-bugs-list mailing list