From octave-maintainers-request at bevo dot che dot wisc dot edu Thu Jan 22 14:31:06 2004 Subject: Re: benchmarks - sort From: Paul Thomas To: octave-maintainers at bevo dot che dot wisc dot edu, David.Bateman@motorola.com Date: Thu, 22 Jan 2004 14:26:20 -0600 David, In spite of promising to shut up about this, here is the result of modifying my sort DLD to deal with NaNs! With your mod included and 10^5 randomly distributed elements, perverted by 1 NaN, octave's sort runs in 0.35s and mysort2 in 0.21s. If the operator does not deal with NaNs, this latter is 0.18s. Of course, a preliminary sort that put NaNs, -inf and +infs in their correct places would more or less recover the lower figure. Most of the performance improvement is obtained from the use of a pointer array, which is the only array being sorted. The algorithm that used a multimap, sorted double pairs and so ran up an extra overhead in movs. In conclusion, I will use your sort algorithm but found mine to be an interesting exercise. Best regards Paul