import timeit setup = 'x = 20000' stmts = ''' # Loop with a high-proportion of opcodes with an oparg while x: a, b, c, d, e, f, g = x, x, x, x, x, x, x x -= 1 ''' print(min(timeit.Timer(stmts, setup).repeat(7, 10000000)))