I remember from assembly that integer division instructions yield both the quotient and remainder. So, in python will the built-in divmod() function be better performance-wise than using the % and // operators (suppose of course one needs both the quotient and the remainder)? q, r = divmod(n, d) q, r = (n // d, n % d) To measure is to know (all timings on a Macbook Pro 2.8Ghz i7): >>> import sys, timeit >>> sys.version_info sys.version_info(major=2, minor=7, micro=12, releaselevel='final', serial=0) >>> timeit.timeit('divmod(n, d)', 'n, d = 42, 7') 0.1473848819732666 >>> timeit.timeit('n // d,