summaryrefslogtreecommitdiff
path: root/performance.sh
diff options
context:
space:
mode:
Diffstat (limited to 'performance.sh')
-rw-r--r--performance.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/performance.sh b/performance.sh
new file mode 100644
index 0000000..1efe2c3
--- /dev/null
+++ b/performance.sh
@@ -0,0 +1,13 @@
+python3 -m timeit -s "
+from decorator import decorator
+@decorator
+def do_nothing(func, *args, **kw):
+ return func(*args, **kw)
+@do_nothing
+def f():
+ pass
+" "f()"
+python3 -m timeit -s "
+def f():
+ pass
+" "f()"