in reply to Re: Speed comparison of foreach vs grep + map
in thread Speed comparison of foreach vs grep + map

If you do need to improve runtime you should try to be smart rather than clever. A smart solution is likely to approach the problem from an entirely different direction. A clever solution is likely to be a nasty mess arrived at by iterative tweaking the code to squeeze the last drop of performance out of a sub-optimum algorithm.

-- GrandFather

Love it! ... so much that I could not restrain myself from adding it to on Code Optimization and Performance References. :-)

BTW, my favourite quote from that node is from Michael Abrash:

Without good design, good algorithms, and complete understanding of the program's operation, your carefully optimized code will amount to one of mankind's least fruitful creations -- a fast slow program.

👁️🍾👍🦟
  • Comment on Re^2: Speed comparison of foreach vs grep + map