Improve the memory performance and speed of heapq.nsmallest() by using
an alternate algorithm when the number of selected items is small relative to the full iterable.
Showing
Please
register
or
sign in
to comment
an alternate algorithm when the number of selected items is small relative to the full iterable.