I'm looking for an advanced algorithm to create a converter between different bases. The algorithm should be able to convert long numbers(for example with 10000 characters). So the most common algorithm is too inefficient ($O(n^2)$ time complexity).
Example:
Convert $111111111111111111000000000011111111111_2$ to base $10$
Convert $123456789123456789123456789123456789_{10}$ to base $26$
Also I'm curious if is possible to convert directly between unrelated bases. (not like this A->10 10->B (A,B, 10 represent base))