Donald Stufft, 15.11.2012 00:00: > $ pypy -m timeit 'dict()' > 1000000000 loops, best of 3: 0.000811 usec per loop > > $ pypy -m timeit '{}' > 1000000000 loops, best of 3: 0.000809 usec per loop > > $ pypy -m timeit 'def md(**kw): return kw; md()' > 100000000 loops, best of 3: 0.0182 usec per loop > > $ pypy -m timeit -s 'def md(**kw): return kw' 'md()' > 1000000000 loops, best of 3: 0.00136 usec per loop
Yep, I really like the fact that optimisers can fold stupid benchmarks into no-ops. I wonder why it fails so badly in the latter two cases, though. You should bring that to the attention of the PyPy developers, they might want to fix it. Stefan _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com