@Cosinux That depends on technology details. For this kind of complex calculation, a ROM is probably faster.
Given similar technology used for the ROM vs pile-of-gates.
If you can actually make a mask-programmed ROM, it will almost certainly be faster.
@Cosinux The trick with multiplication is that the output has more bits than the input. For example if you multiply two 8-bit unsigned numbers, you could get a 16-bit result.
But that just needs two 64Kx8 PROMs instead of one.
Or you build something like a 4-bit multiplier (with 8-bit output) and combine outputs like when you do pencil-and-paper multiplication.
Nevermind, trying to line up ascii on here isn't working well