diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-07 21:39:09 +0300 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-07 22:34:04 +0300 |
| commit | 2a05f05f4468bc937e412e94df75da9dce9a6148 (patch) | |
| tree | 72efdd3db3631a446124e32a32e8bdc528ee4511 /tests/bench/func_args-1.2-pos_3.py | |
| parent | 169515126784425df7b6fcd0a78ee5eb7dd84788 (diff) | |
tests/bench: Add tests for various ways to pass function args.
Passing 3 args with keywords is for example 50% slower than via positional
args.
Diffstat (limited to 'tests/bench/func_args-1.2-pos_3.py')
| -rw-r--r-- | tests/bench/func_args-1.2-pos_3.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/bench/func_args-1.2-pos_3.py b/tests/bench/func_args-1.2-pos_3.py new file mode 100644 index 000000000..7e03ee2f8 --- /dev/null +++ b/tests/bench/func_args-1.2-pos_3.py @@ -0,0 +1,10 @@ +import bench + +def func(a, b, c): + pass + +def test(num): + for i in iter(range(num)): + func(i, i, i) + +bench.run(test) |
