|
|
|
|
|
by explodingwaffle
607 days ago
|
|
The more and more bit-hacks I see, the more convinced I am that they should be handled by a cleverer compiler. Some intrinsic(s) where you say “do x, y, to these bits” and it just figures out the optimum way of doing it for whatever platform you compile for. |
|
https://programming.sirrida.de/calcperm.php
It doesn't always find the optimal solution but it usually gets close.