We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08fd9a2 commit ce2edf8Copy full SHA for ce2edf8
src/bin/bench_gen.py
@@ -0,0 +1,37 @@
1
+#!/usr/bin/env python
2
+
3
+N = 10000
4
5
+A_functions = ""
6
+calls = ""
7
+for i in range(N):
8
+ func_A = f"""
9
+def A{i}(x: i32) -> i32:
10
+ y: i32
11
+ z: i32
12
+ y = {i}
13
+ z = 5
14
+ x = x + y * z
15
+ return x
16
+"""
17
+ A_functions += func_A
18
+ calls += f" y = A{i}(y)\n"
19
20
+source = f"""\
21
+from ltypes import i32
22
23
+{A_functions}
24
25
+def Driver(test_val: i32) -> i32:
26
27
+ y = test_val
28
+{calls}
29
+ return y
30
31
+def Main0():
32
+ print(Driver(5))
33
34
+Main0()
35
36
37
+print(source)
0 commit comments