Message352689
> It's not clear to me if anyone benchmarked to see if the
> conversion to a macro had any measurable performance benefit.
I tested on that day, also use this command:
python.exe -m pyperf timeit -s "from collections import deque; consume = deque(maxlen=0).extend; r = range(256)" "consume(r)" --duplicate=1000
I remember the results are:
inline function: 1.6 us
macro version : 1.27 us
(32-bit release build by MSVC 2017)
Since the difference is too obvious, I tested it only once for each version. |
|
Date |
User |
Action |
Args |
2019-09-18 05:00:18 | malin | set | recipients:
+ malin, rhettinger, mark.dickinson, vstinner, Greg Price, sir-sigurd, aeros |
2019-09-18 05:00:18 | malin | set | messageid: <1568782818.08.0.103256098847.issue37812@roundup.psfhosted.org> |
2019-09-18 05:00:18 | malin | link | issue37812 messages |
2019-09-18 05:00:17 | malin | create | |
|