in reply to Re: Code Efficiency: Trial and Error?
in thread Code Efficiency: Trial and Error?

Well... I often ask myself the same question. I often do things in a very readable way, that works well, no bugs etc... And then my boss will come, hack the code, make it two times shorter, and result in a faster more efficient way. Often not as readable though.
I also often wonder when building regexes if Im using the fastest way. It would be nice to have examples of two regexes doing the same thing but one faster than the other, and explain why it is faster, so that we can understand how to write more efficient code.
  • Comment on Re: Re: Code Efficiency: Trial and Error?

Replies are listed 'Best First'.
Re: Re: Re: Code Efficiency: Trial and Error?
by CukiMnstr (Deacon) on Oct 11, 2002 at 22:48 UTC
    you might want to check Mastering Regular Expressions by Jeff E.F.Friedl for a deep coverage of regular expressions, with a whole chapter dedicated to perl's regexes.

    btw, that book review is for the first edition, so you might want to know there is a second edition published in july 2002.

    hope this helps,