3 ms·
> 90 percent of the time, if you make it beautiful, it will already be fast. In fact, I disagree with this. The reason is that "elegant" usually means "decoupl
by bnegreve 13y ago
> 90 percent of the time, if you make it beautiful, it will already be fast.
In fact, I disagree with this. The reason is that "elegant" usually means "decoupled" whereas many optimizations actually consists in "recoupling" to take advantage of special cases or to share resources among various decoupled objects.
Designing software to be fast and elegant is actually quite challenging problem. Of course, that makes it even more interesting.
- lostcolony 13y agoI would argue that the reason you are choosing to recouple things, is because you fall into that 10%. Most problems can and should be solved first correctly, second elegantly, and you will find at that stage it is "fast enough". It's so rare to not find that to be true, overall (i.e., some industries, such as high speed trading, there is no such thing as fast enough, but they're writing < 10% of the total amount of code being written), that yes, I'd say the quote is accurate, and the exceptions fall into that 10%. Interestingly, too, you indicate "recoupling". That is, to couple again. Meaning for you to even be in this situation, realizing what you need to do, you had to first make it elegant. Otherwise you'd be optimizing...what, exactly? You have no metric.