Randomness in built-in .sort

Benji Smith dlanguage at benjismith.net
Mon Jan 5 16:41:36 PST 2009


dsimcha wrote:
> == Quote from Bill Baxter (wbaxter at gmail.com)'s article
>> Actually, a function to sort multiple arrays in parallel was exactly
>> what I was implementing using .sort.  So that doesn't sound like a
>> limitation to me at all.   :-)
>> --bb
> 
> Am I (and possibly you) the only one(s) who think that sorting multiple arrays in
> parallel should be standard library functionality?  The standard rebuttal might be
> "use arrays of structs instead of parallel arrays".  This is a good idea in some
> situations, but for others, parallel arrays are just plain better.  Furthermore,
> with D's handling of variadic functions, generalizing any sort to handle parallel
> arrays is easy.

I've written my own parallel-array quicksort implementation (several 
times over, in many different languages).

Parallel sorting is one of my favorite tricks, and I think it definitely 
belongs in the standard library.

--benji



More information about the Digitalmars-d mailing list