I am trying to determine the time complexity of an algorithm that I have, but I need first to know the time complexity of the % (modulo) operator in Python.
According to this post on http://math.stackexchange.com, its time complexity could be something similar to O(log m log n)
, and in some specific cases it could also be optimised to be constant, but I would like to know if someone really knows the time complexity of %
, so that I can determine correctly the overall time complexity of my algorithm.
Of course I am aware that the complexity could change from implementation to implementation, but I am interested only in the standard implementation.