File: performance.sh

package info (click to toggle)
python-decorator 2.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 280 kB
  • ctags: 58
  • sloc: python: 129; makefile: 46; sh: 13
file content (16 lines) | stat: -rw-r--r-- 219 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
python -m timeit -s "
from decorator import decorator

@decorator
def do_nothing(func, *args, **kw):
    return func(*args, **kw) 

@do_nothing
def f():
    pass
" "f()"

python -m timeit -s "
def f():
    pass
" "f()"