On 15/11/2012 06:32, Stefan Behnel wrote: > 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. Agreed, but Donald, please try with a bunch of keys rather than an empty dict... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4