[pypy-dev] array sorting

Thomas Conway drtomc at gmail.com
Fri Nov 25 21:32:16 EST 2016


Hi Pypies,

I'm new to the list, so let me start by saying I totally love pypy and am
using it for my bioinformatics codes.

I realise this isn't exactly a pypy specific problem, by the standard array
module doesn't provide sort() on arrays. In consequence you either have to
convert them to lists and use list.sort() or you have to implement sort on
them yourself. I've implemented several sorts (radix, american flag, quick
sort, in-place heap sort) and they all perform slower than converting to a
list and sorting that.

It strikes me that any python implementation should benefit from an
array.sort() method since unboxing/type checking is unnecessary.

What is the wisdom of this community on the matter? It's something I'd
consider taking on if it was generally deemed worthwhile.

Tom.
-- 
Thomas Conway
drtomc at gmail.com
My friends, love is better than anger. Hope is better than fear. Optimism
is better than despair. So let us be loving, hopeful and optimistic. And
we'll change the world. - Jack Layton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20161126/69f5d051/attachment.html>


More information about the pypy-dev mailing list