This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wbolster
Recipients rhettinger, wbolster
Date 2013-09-08.12:14:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378642484.2.0.326348227301.issue18962@psf.upfronthosting.co.za>
In-reply-to
Content
An additional speedup would be to add a "if len(h) == 1" check inside the while loop, and just yield from the remaining iterator if a single iterable remains. This would also speed up merges with multiple inputs, as it doesn't do the whole heapreplace() loop for the last remaining iterable. Example: merge([], [], [], range(100000). This would involve some more refactoring inside the function though, since the current implementation only stores the .next() function for each iterable.
History
Date User Action Args
2013-09-08 12:14:44wbolstersetrecipients: + wbolster, rhettinger
2013-09-08 12:14:44wbolstersetmessageid: <1378642484.2.0.326348227301.issue18962@psf.upfronthosting.co.za>
2013-09-08 12:14:44wbolsterlinkissue18962 messages
2013-09-08 12:14:44wbolstercreate