diff options
Diffstat (limited to 'tests/internal_bench/funcall-2-funcall.py')
-rw-r--r-- | tests/internal_bench/funcall-2-funcall.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/internal_bench/funcall-2-funcall.py b/tests/internal_bench/funcall-2-funcall.py new file mode 100644 index 0000000000..d5c36c60aa --- /dev/null +++ b/tests/internal_bench/funcall-2-funcall.py @@ -0,0 +1,12 @@ +# Function call overhead test +# Perform the same trivial operation as global function call +import bench + +def f(x): + return x + 1 + +def test(num): + for i in iter(range(num)): + a = f(i) + +bench.run(test) |