diff options
Diffstat (limited to 'tests/internal_bench/var-6.3-instance-property.py')
| -rw-r--r-- | tests/internal_bench/var-6.3-instance-property.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/internal_bench/var-6.3-instance-property.py b/tests/internal_bench/var-6.3-instance-property.py new file mode 100644 index 000000000..b4426ef79 --- /dev/null +++ b/tests/internal_bench/var-6.3-instance-property.py @@ -0,0 +1,17 @@ +import bench + + +class Foo: + @property + def num(self): + return 20000000 + + +def test(num): + o = Foo() + i = 0 + while i < o.num: + i += 1 + + +bench.run(test) |
