[Pdx-pm] Software development and The Rules

Joshua Keroes jkeroes at eli.net
Thu Sep 26 17:19:16 CDT 2002

On (Thu, Sep 26 14:46), chromatic wrote:
> 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.

To answer your first question, yes, I'm defining "space" to mean "memory".

Believe it or not, you can do even better than three bytes per digit. You're
getting warm.


More information about the Pdx-pm-list mailing list