summaryrefslogtreecommitdiffstatshomepage
path: root/tests/internal_bench/var-8.1-namedtuple-5th.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/internal_bench/var-8.1-namedtuple-5th.py')
-rw-r--r--tests/internal_bench/var-8.1-namedtuple-5th.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/internal_bench/var-8.1-namedtuple-5th.py b/tests/internal_bench/var-8.1-namedtuple-5th.py
new file mode 100644
index 0000000000..0bcf661803
--- /dev/null
+++ b/tests/internal_bench/var-8.1-namedtuple-5th.py
@@ -0,0 +1,12 @@
+import bench
+from ucollections import namedtuple
+
+T = namedtuple("Tup", ["foo1", "foo2", "foo3", "foo4", "num"])
+
+def test(num):
+ t = T(0, 0, 0, 0, 20000000)
+ i = 0
+ while i < t.num:
+ i += 1
+
+bench.run(test)