Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:
Updated the benchmarking code to include a 4th variant that accumulates sorted sublists during the partitioning phase. Results from one run: n: 100000 k: 100 [105856, 105917, 105951, 105977, 106366] nsmallest [166465, 166478, 166507, 166639, 166748] heapifying_smallest [253705, 260410, 264225, 289600, 333626] selecting_smallest [111048, 117112, 144633, 168109, 402758] partitioning_smallest ---------- Added file: http://bugs.python.org/file20749/heapq_benchmark.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11180> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com