Mercurial > memoize-slides
changeset 119:e543ed9c2908
Delete page speed.py
| author | 127.0.0.1 |
|---|---|
| date | Fri, 06 Dec 2013 23:59:31 +0100 |
| parents | 8908ab8060a4 |
| children | 9b79766ea2c2 |
| files | speed.py |
| diffstat | 1 files changed, 0 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/speed.py Fri Dec 06 23:59:18 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -import timeit - -setup = "CACHE = {'a': 1}" - -command = """ -try: - return CACHE['a'] -except KeyError: - return 1 -""" - -print timeit.repeat(command, setup=setup) - -command = """ -try: - return CACHE['b'] -except KeyError: - return 1 -""" - -print timeit.repeat(command, setup=setup) - - \ No newline at end of file
