[issue34561] Replace list sorting merge_collapse()?

Tim Peters report at bugs.python.org
Sun Aug 29 20:34:55 EDT 2021


Tim Peters <tim at python.org> added the comment:

And another runstack.py adds `shivers4()`, which reworks `shivers3()` (length-adaptive ShiversSort) so that division, log2(), and floor() aren't used anymore. It does need a loop, though, which needs to go around a number of times `k` such that k is the smallest integer for which

2**k * max(run_length_1, run_length_2, run_length3) >=
1 + len(original_list)

----------
Added file: https://bugs.python.org/file50243/runstack.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34561>
_______________________________________


More information about the Python-bugs-list mailing list