Author serhiy.storchaka
Recipients alexandre.vassalotti, josh.r, rhettinger, serhiy.storchaka
Date 2016-03-06.10:46:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457261195.42.0.0840067427889.issue26167@psf.upfronthosting.co.za>
In-reply-to
Content
> This looks nicer and should run faster by taking advantage of the LIST_APPEND opcode.

The difference is insignificantly (less than 1%) for large lists (list(range(10000))), but it is 3-4% slower for small lists (list(range(10))) and 20-25% slower for empty lists.

On 2.7 your code always has advantage, but on 3.x seems it doesn't have any advantage (thanks to overhead of using a generator).
History
Date User Action Args
2016-03-06 10:46:35serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, alexandre.vassalotti, josh.r
2016-03-06 10:46:35serhiy.storchakasetmessageid: <1457261195.42.0.0840067427889.issue26167@psf.upfronthosting.co.za>
2016-03-06 10:46:35serhiy.storchakalinkissue26167 messages
2016-03-06 10:46:35serhiy.storchakacreate