Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Does anyone have a list of 'donts' when optimizing?

by Biker (Priest)
on Apr 16, 2002 at 14:03 UTC ( #159485=note: print w/replies, xml ) Need Help??


in reply to Does anyone have a list of 'donts' when optimizing?

Dont:

while(1){}



Everything went worng, just as foreseen.

Replies are listed 'Best First'.
Re: Re: Does anyone have a list of 'donts' when optimizing?
by Molt (Chaplain) on Apr 16, 2002 at 14:16 UTC

    Not really hints on how to optimise, more hints on how to avoid a lot of problems with it. Make sure your code works beforehand, and use unit tests such as Test::More, or Test::Harness to make sure your code remains working whilst you're torturing it. Yes, there are rather a lot more of them to chose from if you look.. this is one wheel important enough that it's worth having a few choices as to what colour you want.

    Oh, and make sure you know the output from your profiler. There's nothing worse than optimising the wrong part.

    <CITE>"Premature optimization is the root of all evil." - Donald Knuth</CITE>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://159485]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2016-12-02 21:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (50 votes). Check out past polls.