Hacker News new | past | comments | ask | show | jobs | submit login

Code quality is highly subjective though and often what some might consider as "high quality" also comes with a cost to performance.

Fortunately the linked book provides a simple way to decide when something needs to be optimized under "Understanding High Performance" [0]

--

Before we can create high-performance code, we must understand what high performance is. The objective (not always attained) in creating high-performance software is to make the software able to carry out its appointed tasks so rapidly that it responds instantaneously, as far as the user is concerned. In other words, high-performance code should ideally run so fast that any further improvement in the code would be pointless.

Notice that the above definition most emphatically does not say anything about making the software as fast as possible. It also does not say anything about using assembly language, or an optimizing compiler, or, for that matter, a compiler at all. It also doesn’t say anything about how the code was designed and written. What it does say is that high-performance code shouldn’t get in the user’s way—and that’s all.

--

(emphasis mine)

[0] https://www.jagregory.com/abrash-black-book/#understanding-h...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: