Thursday, July 13, 2006

cpu cycles

Yesterday I was faced with a design tradeoff on a Java API: make it
  • clean and easy to understand but slightly inefficient; or
  • more efficient in the simple case but a little more complicated overall?
My coworker provided some great insight. To paraphrase him :
APIs will never get cleaner, but CPU cycles will always get cheaper

That doesn't mean that one shouldn't try to design APIs that are efficient. It just means that you have to be careful how much emphasis you place on that.

No comments: