[issue21592] Make statistics.median run in linear time

Stefan Behnel report at bugs.python.org
Sun Jun 1 12:54:37 CEST 2014


Stefan Behnel added the comment:

Updating the type declaration file to remove the dependency on the list builtin and allow arbitrary containers. The test code has this dependency (calls a.sort()), but the current statistics module in the stdlib does not (calls sorted()). Timings do not change, at least not more than you would expect by randomisation (i.e. repeated runs go up and down within the same bounds). Note that the timings are still specific to lists and would be higher for other containers.

----------
Added file: http://bugs.python.org/file35429/select.pxd

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21592>
_______________________________________


More information about the Python-bugs-list mailing list