Author Ma Lin
Recipients Greg Price, Ma Lin, aeros, mark.dickinson, rhettinger, sir-sigurd, vstinner
Date 2019-09-18.05:00:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568782818.08.0.103256098847.issue37812@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2019-09-18 05:00:18Ma Linsetrecipients: + Ma Lin, rhettinger, mark.dickinson, vstinner, Greg Price, sir-sigurd, aeros
2019-09-18 05:00:18Ma Linsetmessageid: <1568782818.08.0.103256098847.issue37812@roundup.psfhosted.org>
2019-09-18 05:00:18Ma Linlinkissue37812 messages
2019-09-18 05:00:17Ma Lincreate