We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aaff82a commit f01fa45Copy full SHA for f01fa45
3 files changed
tests/bench/var-5-class-attr.py
@@ -0,0 +1,11 @@
1
+import bench
2
+
3
+class Foo:
4
+ num = 20000000
5
6
+def test(num):
7
+ i = 0
8
+ while i < Foo.num:
9
+ i += 1
10
11
+bench.run(test)
tests/bench/var-6-instance-attr.py
@@ -0,0 +1,14 @@
+ def __init__(self):
+ self.num = 20000000
+ o = Foo()
+ while i < o.num:
12
13
14
tests/bench/var-7-instance-meth.py
@@ -0,0 +1,17 @@
+ self._num = 20000000
+ def num(self):
+ return self._num
+ while i < o.num():
15
16
17
0 commit comments