Author malin
Recipients Greg Price, aeros, malin, mark.dickinson, rhettinger, sir-sigurd, vstinner
Date 2019-09-18.05:00:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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:18malinsetrecipients: + malin, rhettinger, mark.dickinson, vstinner, Greg Price, sir-sigurd, aeros
2019-09-18 05:00:18malinsetmessageid: <>
2019-09-18 05:00:18malinlinkissue37812 messages
2019-09-18 05:00:17malincreate