logoalt Hacker News

nukanse • yesterday at 11:50 PM • 2 replies • view on HN

But it's justified. Efficiency on key parts of the code, of course. Not on the entire code base.

You can mitigate the unreadability in many ways. For example c++ allows to generate magic numbers using constexpress, where the code itself is clear and human readable.

You can create a loop to calculate a lookup table and store it into a small number of uint64. The code shows what the magic numbers mean, and can be debugged.


Replies

lifthrasiir • yesterday at 11:57 PM

The reduction of code size in general is called an abstraction. So it is also justified as long as it is not taken to the extreme.

➕ show 1 reply
yrjrjjrjjtjjr • today at 3:09 AM

Now your hourly builds have to redo the expensive calculation in perpetuity.