import pyperf import xxlimited runner = pyperf.Runner() data = list(range(10**5)) runner.bench_time_func('incref', xxlimited.bench_incref, data, inner_loops=len(data))