Working through the
[[http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html][99
Lisp Problems]] in Erlang and just did a comparison of two different
methods for computing
[[http://mathworld.wolfram.com/TotientFunction.html][Euler's totient
function]]. The results:

#+BEGIN_QUOTE
  > lp:p39(10090). p34 took 10864 micro seconds and returned 4032. p37
  took 72 micro seconds and returned 4032.
#+END_QUOTE

I'll leave it to the reader to work the problems themselves, but it does
illustrate the importance of good algorithm design in mission-critical
parts of your code. Were my application's lifeblood to be in calculating
phi, and I was naive and took the p34 algorithm to solve for phi, I
would be 150x slower at doing the job. I guess the moral is, always
research mission-critical portions of code for optimized algorithms. A
sub-moral would be to keep abreast of the latest and greatest in
algorithms and math in general. I like to have a friend in grad school
studying quantum mechanics to keep me informed!
