4 ms·
It's a very important point, and one that is often overlooked, that correctness trumps performance in almost every bit of code you ever write (though not all, t
by cesaref 6y ago
It's a very important point, and one that is often overlooked, that correctness trumps performance in almost every bit of code you ever write (though not all, there are exceptions). It's also very easy to fixate on measurable performance which is often very removed from the realities of where your code is running (with core contention and memory pressure etc).
I remember years ago coming across a highly optimised md5 calculation function in a legacy codebase that I inherited. Much care have been put into writing it, with comments highlighting how many clock cycles on an Athlon processor were required to run it. This was clever stuff, but the firm wasn't using Athlon processors, and hadn't for years. A quick comparison with boost showed that boost was faster (on the processors of the time), so it got chopped out.