O'Reilly logo

Common Lisp Recipes: A Problem-Solution Approach by Edmund Weitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17. Optimization

When I was younger, I learned somewhere the Three Golden Rules of Optimization. They are as follows:

  (I)    Don’t do it!

  (II)    Don’t do it!

  (III)    Only for experts: Don’t do it (yet).

I still think this is the most important advice you can give concerning optimization. Way too many people spend way too much time optimizing code although they shouldn’t—or at least they’re optimizing in all the wrong places. And optimization is not only useless work 99% of the time, it also usually makes the code harder to read and maintain and can introduce bugs.

So, in a way you shouldn’t read this chapter at all. Or only if you you’re absolutely sure that you really, really need it. And then you should start with Recipes 17-1 and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required