To hop on board what everyone else is saying, evaluate in the following order:
in reply to Efficient programming
For the record, this is the exact set of steps I use and have used for over 7 years.
- Does it work? If not, make it work first.
- Does it run fast enough? If so, stop. Fast enough is determined by need. If it's a batch job, then 8 hours may be fast enough. On the web, anything under 3-5 seconds is fast enough. If you need faster than 0.1s, you're probably using the wrong tools (i.e., Perl isn't the right language).
- If it needs to be faster, then find a better algorithm. Look at CPAN.
- If the right algorithms is in use, find a better implementation. Look at CPAN.
- If all else fails, ask here.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?