Ma Lin <malin...@163.com> added the comment:
> 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37812> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com