[Pdx-pm] RE: [Pdx-pm] Software development and The Rules

Joshua Keroes jkeroes at eli.net
Wed Sep 25 17:03:26 CDT 2002


Nope, that's not it. For one thing, you've just read 1_000_000
numbers into memory, that's 7 bytes * 1_000_000 of space of the
disk.

-Joshua

On (Wed, Sep 25 13:34), Austin Schutz wrote:
> > For example:
> > 
> > Q: What's the fastest, most space-efficient way to sort all
> > of Portland's 503 phone numbers? 
> > 
> 
> for(@numbers) {
>   s/[^\d]//g;
> }
> 
> @sorted = sort { $a <=> $b }(@numbers);
> 
> 	Oh, you meant fast and small for the computer. Does it matter?
> 	Most of the time optimal solutions are ones that are easy to
> write, unless you have a specific need for performance.
> 
> 	Of course, there's still some point where you have to wonder.
> A modern pentium 4 processes what, 2.5 billion instructions per second?
> If it takes Windows two minutes to boot, how many of the billions of
> instructions were pure bloat?
> 
> 	Austin
> 	
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at mail.pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list



More information about the Pdx-pm-list mailing list