On 05/09/2015 11:29 AM, Frank Barknecht wrote:
Hi,
the list-sort.pd abstraction in the [list]-abs is Pd vanilla and uses data structures to do the sorting. The actual sorting is fast, but first the list is copied into a data structure [struct f float x] and into a subpatch, which takes a moment. Then you just sort the subpatch with the message "sort" to it.
In my benchmarks four yers ago it was faster than the other sorting algorithms available at the time, which are also included in the collection.
That's probably because the other sorting algorithms spend a significant amount of time copying lists.
To get anything close to the speed of the canvas "sort" method you'd have to have an object that manipulates an incoming list in place. However, that'd have serious side effects, which is why I suppose no objects do that kind of thing.
-Jonathan
All the best,