Author steven.daprano
Recipients steven.daprano, thomasahle
Date 2014-05-28.23:49:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20140528234907.GD10355@ando>
In-reply-to <1401288209.47.0.701632345557.issue21592@psf.upfronthosting.co.za>
Content
On Wed, May 28, 2014 at 02:43:29PM +0000, Thomas Dybdahl Ahle wrote:

> I have written some proof of concept code here [1], I would appreciate 
> you commenting on it, before I turn it into a patch, as I haven't 
> contributed code to Python before.

Thanks Thomas! I will try to look at this over the weekend (today is 
Thursday my time). If I haven't responded by Monday your time, please 
feel free to send me a reminder.

> I have tried to write it as efficiently as possible, but it is of 
> course possible that the c-implemented `sorted()` code will be faster 
> than even the smartest python-implemented select.

My quick-and-dirty tests suggest that you need at least 10 million items 
in the list before a pure Python median-of-median algorithm is as fast 
as the median algorithm based on sorting in C.

> [1]: http://pastebin.com/30x0j39a
History
Date User Action Args
2014-05-28 23:49:25steven.dapranosetrecipients: + steven.daprano, thomasahle
2014-05-28 23:49:25steven.dapranolinkissue21592 messages
2014-05-28 23:49:24steven.dapranocreate