[Pdx-pm] Software development and The Rules

chromatic chromatic at wgz.org
Thu Sep 26 16:46:15 CDT 2002

On Thursday 26 September 2002 14:32, Curtis Poe wrote:

> As for sorting the list, you mentioned something along the lines of "the
> most space-efficient" way".
> How are you defining space efficient?  Do you mean memory efficient?  My
> initial thought for the problem would be to use a merge sort via the
> File::Sort module, but since that creates temp files, perhaps that's not
> the most "space-efficient".

I believe I can make the right answer a little clearer.  The nature of the 
data is pretty simple.  Not only are there ten possible values for each 
digit, but there are probably fewer than a thousand valid prefixes.

Instead of storing each digit as a character (multiple bytes in a Unicode 
world), you can pack them into a smaller format.  I'd guess that three bytes 
apiece should do it, with some back of the envelope math.

A radix sort might be nice, too, but that's just a guess.  :)

-- c

More information about the Pdx-pm-list mailing list