summaryrefslogtreecommitdiffstatshomepage
path: root/tests/bench/var-6-instance-attr.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bench/var-6-instance-attr.py')
-rw-r--r--tests/bench/var-6-instance-attr.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/bench/var-6-instance-attr.py b/tests/bench/var-6-instance-attr.py
new file mode 100644
index 0000000000..787ed870fb
--- /dev/null
+++ b/tests/bench/var-6-instance-attr.py
@@ -0,0 +1,14 @@
+import bench
+
+class Foo:
+
+ def __init__(self):
+ self.num = 20000000
+
+def test(num):
+ o = Foo()
+ i = 0
+ while i < o.num:
+ i += 1
+
+bench.run(test)