[pypy-dev] array sorting

Konstantin Lopuhin kostia.lopuhin at gmail.com
Sat Nov 26 15:35:19 EST 2016


Hello Thomas,

I think a library with sort on arrays can useful, for example I needed
radix sort in one project and would have used a library if such
library existed :)

2016-11-26 5:32 GMT+03:00 Thomas Conway <drtomc at gmail.com>:
> 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
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>


More information about the pypy-dev mailing list