Monday, November 3, 2008

Performance Basics

From my experience, it seems like these are the basics of achieving good performance:

  • Cache.

  • Index.

  • Parallelize.

  • Profile.

  • Simplify/Shrink (without changing external behavior).


If you move to a fuzzier world, these become additional techniques:

  • Approximate.

  • Simplify/Shrink (by changing requirements).


I don't emphasize algorithms, because picking up ready-made algorithms from a third party is so common these days. (Does that mean we actually make progress? I think so.) However, some folks still have to provide said algorithms, so it might apply to you. The same kind of issue applies to being hardware-friendly, I think.

Anything else I'm missing that doesn't fall into these categories?

2 comments:

  1. I'd say "inline" is another optimization basic, whether it is loop unrolling in C programming, or making a hotspot function small enough so that a JVM can inline the function.

    ReplyDelete
  2. I think I'd mostly put inlining under the "let algorithm folks figure it out" category, but I could be wrong. Could be wrong even to have that rug to shove things under.

    ReplyDelete