4 ms·
Shift is one cycle. Or is one cycle. If your table is using a fast algorithm, it’s going to add a few more cycles and a couple very predictable branches. Meanw
by hajile 3y ago
Shift is one cycle. Or is one cycle. If your table is using a fast algorithm, it’s going to add a few more cycles and a couple very predictable branches.
Meanwhile, divide is insanely slow.
If your table is in L1 or L2 cache, it should be faster than the divide, but if not, I’d guess it would be slower. As the article says, that’s why you test then hope it doesn’t change later.
- fluoridation 3y agoSure, but my point is, how fast does the operation need to be and how slow does accessing the table need to be for the LUT to not be worth it, if a multiplication and a division is too slow?