in reply to Re: Re: Is too little too much? Coding under the microscope...
in thread Is too little too much? Coding under the microscope...

Why spend a lot of time worrying about efficiency as you're writing the code? Do you know that your program is slow? Is it too slow? Why worry about small gains in efficiency before it runs correctly? For that matter, how could you know that it needs speeding up until it works?

Once you have it running right, and you've decided that it needs speeding up, then you can apply a tool like Devel::DProf or Devel::SmallProf to find and fix the "hot spots". But it's unlikely that shortening two lines that get called once into one line is going to make enough difference to make it worth while agonizing about it up front.

  • Comment on Re: Is too little too much? Coding under the microscope...