3 ms·
Can you explain why some would go down this loop route? I don't know C but the obvious solution to me is what you posted.
by jwmoz 5y ago
Can you explain why some would go down this loop route? I don't know C but the obvious solution to me is what you posted.
- sverhagen 5y agoIt seems a simple way of building the "mult" solution as a composition of the existing primitive(s), here "add". But agreed, that I would not find the tradeof acceptable either.
- Sohcahtoa82 5y agoForget the locking and data race problem...I think about the massive performance problem. It turns multiplication into O(n) instead of O(log n). `mult 2000` would take 2000 times longer than `mult 2`. Imagine being able to DoS a server just by asking it to multiply two numbers.