in reply to How do I get better at thinking about optimizing my Perl?

It is my belief that you could get better by not considering guesswork if you are serious into optimization.
You must consider facts and you must work on what you can control, so rethinking your algorithm would be the first approach.
Then you can benchmark your different solutions and choose the one that performs better.
After choosing the best algorithm you can dwell upon turning your code unreadable by using some of the good old techniques that you must be familiar with from your C background, such as lookup tables or, even deeper, loop unroling, less function calls ....
Your desk is lacking an algorithms book :)

--
olus
  • Comment on Re: How do I get better at thinking about optimizing my Perl?