POV-Ray : Newsgroups : povray.off-topic : Tape-sort : Re: Tape-sort Server Time
3 Sep 2024 17:16:04 EDT (-0400)
  Re: Tape-sort  
From: scott
Date: 13 Oct 2010 08:49:55
Message: <4cb5aaf3@news.povray.org>
> Hmm, yes. The running time of a radix sort is proportional to the length 
> of the keys, and regardless of the volume of data. Which means that even 
> sorting a small volume of data could be quite slow if the keys are large.

Indeed, I think it's more suited to large volumes of data with relatively 
small keys.  I just thought the lack of random access meant it might be 
quite well suited to tape drives.

> It also doesn't help that the keys I want to sort by are floating-point 
> numbers... although I suppose you could truncate them to integers and do 
> it that way.

Or do a radix sort on the mantissa part (which I guess is maximum 8 digits 
or so), then on the exponent (3 digits?).  That should be more efficient 
than simply converting the float to an integer, especially if you have a 
very wide range of values.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.