|
|
|
|
|
by userbinator
3174 days ago
|
|
The real way to multiply without loops is to use a lookup table, or unroll the (fixed iteration) shift-and-add loop. That page is both hilarious and sad at the same time. Hilarious because the second "solution" clearly has a loop, and sad because sites like those don't really help anyone. Some of the pages on that site are downright WTFs: http://www.techiedelight.com/generate-binary-numbers-1-n/ |
|
Can you elaborate on this? I understand the shifting but didn't understand the "loop unrolling fixed iteration part"