Hacker News new | ask | show | jobs
by entrope 9 days ago
The article is explicit that addition is O(n), with n digits, which is cheaper than multiplication is believed to be. Naive multiplication is O(n*n) -- considerably less than your algorithm.
1 comments

My algorithm is O(n+n+..n) which is O(n), since there we also ignore addition fortunately :D
It would only be O(n) if the number of additions was constant. Here it varies with the size of the multiplier, giving us O(n*m).