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.
Now your hourly builds have to redo the expensive calculation in perpetuity.
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.