There is a significant difference in performance if you use larger numbers.
Here is an example using both small and large numbers:
$ py27 -m timeit -s "a=123;b=7" "divmod(a,b)"
10000000 loops, best of 3: 0.0913 usec per loop
$ py27 -m timeit -s "a=123;b=7" "a//b;a%b"
10000000 loops, best of 3: 0.047 usec per loop
$ py27 -m timeit -s "a=123333333333333333333333333333333333333;b=7222222222222222222" "divmod(a,b)"
10000000 loops, best of 3: 0.165 usec per loop
$ py27 -m timeit -s "a=123333333333333333333333333333333333333;b=7222222222222222222" "a//b;a%b"
1000000 loops, best of 3: 0.232 usec per loop
Why the difference?
divmod() requires a function call while // and % are operators. There is additional overhead for a function call relative to operators. So when the cost of the computation is minimal, the overhead of calling a function is much greater than the actual cost of the calculation(s).
For larger numbers, divmod() is faster. divmod() calculates both the quotient and remainder at the same time and returns both of them. The // and % operators each calculate the quotient and remainder but only return one of the results.
divmod() has more overhead but only performs one division. // and % have less overhead but perform two divisions. As long as the overhead is large compared to time to perform division, divmod() will be slower. But once the cost of a division is greater than the overhead, divmod() will be faster.