James Edward Gray II wrote:
>

[other stuff and]

> > Of the solutions not using exists, I come in third (range). That's not
> > bad for an amateur or is it? ;)
>
> Not bad at all.  Your solution was clever, I think, and may even have
> practical uses, since it retains an array order in the hash values.
>
> The real important thing to remember here though is just how
> insignificant this all is!  Take a look up and see how many iterations
> I had to run these benchmarks through, just to get significant enough
> results to measure.  Is your if/else chain going to have 10,000,000
> branches?  If so, Rob knows how to save you less than one second.  ;)
>
> Write good code.  Make that your number one goal.  Don't obsessively
> save keystrokes, don't fine tune for breakneck speeds.  Just write good
> code.  From there, the rest is easy.  Trust me.  ;)

Amen.

If you want super-fast, write assembler.

If you want fast, write C.

If you want useful, maintainable, cute, and usually fast enough, write Perl.

Perl is the best language I know for writing code that does what
it looks like it does. DWIM is more valuable than anything else
in almost all circumstances.

How much will that 3GHz processor and RAID drive cost? And how much
programming time will that buy?

Rob



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to