logoalt Hacker News

Someoneyesterday at 11:28 AM2 repliesview on HN

> I am assuming it would be because multiplying would still be faster than reading from a lookup table?

Even if it isn’t, it still would be a lot cheaper. With 32-bit integers, the lookup table would have 2⁶⁴ 64-bit values. If my math six right, that is 128 exabytes of read-only memory. With 64-but integers, it truly would be impractical, at 2¹²⁸ 128-bit values.


Replies

jdiffyesterday at 12:28 PM

You don't need to look up the entire multiplication in a single move. When we do multiplication outside of our own mental lookup tables, we have an algorithm for that. The one described in the article. You can size your lookup table however large you like.

techpressionyesterday at 2:25 PM

Printing it on paper and manually looking it up is probably cheaper with today’s ram-prices

show 2 replies