Karatsuba algorithm without recursion
10:16 31 Oct 2026

Almost every single example and implementation of the Karatsuba algorithm for fast multiplication on the internet seems to use some form of function recursion, which is fine if you're only working on short bit strings and native sized integers, but i'm writing a big integer library, and with very big numbers that can very quickly cause slowdowns and stack overflow (heh).

A lot of examples and explanations also seem to work on char strings, and uses base 10 for splitting the numbers, whilst im using arrays if integers, where base 10 is not optimal.

Could anybody either point in the right direction, or provide some examples in what to do here?

c