changeset 134:fd4f4fb67949

created
author 127.0.0.1
date Sat, 07 Dec 2013 00:09:22 +0100
parents da19857379a1
children e89ca3107b21
files speed6.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/speed6.py	Sat Dec 07 00:09:22 2013 +0100
@@ -0,0 +1,8 @@
+CACHE = {1: 1}
+
+def run():
+    missed = object()
+    for i in xrange(100000):
+        x = CACHE.get(2, missed)
+        if x is missed:
+            x = 1
\ No newline at end of file