|
|
|
|
|
by paulluuk
1513 days ago
|
|
I think it's also good to mention that actual production code is _rarely_ ever about being optimal. Making something that actually works, can be easily understood, and rarely ever breaks is much more important in almost all cases. There are of course performance requirements for almost any project, but whether your service requires 1 ms or 3 ms in production matters a lot less than whether or not your colleagues can actually understand your code. |
|
As a c dev one of the biggest mistakes I see is some optimizing to get better instruction generation but using shifts instead of divides or things of that sort. If you optimizing like that you probably spent more compute time optimizing than your optimization will ever safe. Plus like the complier in C at least handles that for you.