Alex Gaynor added the comment:

I think this is likely to make timeit less representative of how code actually 
performs in the real world on systems with a JIT. This is because of the cost 
of sequential operations is not strictly "additive" on PyPy.

If you have statements `a` and `b`, and you run `a; b` on PyPy, the performance 
of `a; b` is usually faster than the sum of `a`, `b`, assuming they are not 
100% independent.

This is because the JIT will be able to remove type checks that were already 
performed. Since this just repeats the same statement, the cost of the unrolled 
iterations beyond the first will be massively lower in many cases, producing 
confusing results.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21988>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to