Because I needed to create an efficient algorithm to count the amount of digits of a number, I have come up with the one you can read above. It is a bit slower than len(str(x)) for small numbers, but a lot faster with large ones.
""" Return amount of digits of x. """
return int(math.floor(math.log10(x)) + 1)
Another example on how a good algorithm beats processing power.