Much slower.
In fact I don't need to look at Benchmark to immediately say that your algorithm is O($b), which is slow indeed.
Multiplication is slower than addition in a chip because general multiplication is a complex operation. That said, multiplication is implemented efficiently. Repeated addition is much, much worse than the general routine except for a small number of exceptions. (eg 0, 1, 2.)
In reply to Re (tilly) 3: Fast Multiplication
by tilly
in thread Fast Multiplication
by zencrypt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |