forked from oracle/graalpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmx_graalpython_bench_param.py
More file actions
132 lines (119 loc) · 3.98 KB
/
mx_graalpython_bench_param.py
File metadata and controls
132 lines (119 loc) · 3.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import os
import mx
py = ".py"
pathBench = "graalpython/benchmarks/src/benchmarks/"
pathMicro = "graalpython/benchmarks/src/micro/"
pathInterop = "graalpython/benchmarks/src/interop/"
def _compile_interop():
cc = os.path.join(mx.suite('graalpython').dir, 'graalpython', 'bin', 'sulongcc')
fp = os.path.join(mx.suite('graalpython').dir, pathInterop)
src = "%s/cextmodule.c" % fp
bc = "%s/cextmodule.bc" % fp
if os.path.exists(cc):
if not os.path.exists(bc) or os.stat(src).st_atime > os.stat(bc).st_atime:
os.system("%s %s 2>/dev/null >/dev/null" % (cc, src))
_compile_interop()
pythonGeneratorBenchmarks = {
'euler31-timed': ['200'],
'euler11-timed': ['10000'],
'ai-nqueen-timed': ['10'],
'pads-eratosthenes-timed': ['100000'],
'pads-integerpartitions': ['700'],
'pads-lyndon': ['100000000'],
'python-graph-bench': ['200'],
'simplejson-bench': ['10000'],
# 'whoosh-bench' : '5000',
# 'pymaging-bench' : '5000',
# 'sympy-bench' : '20000',
}
pythonObjectBenchmarks = {
'richards3-timed': ['200'],
'bm-float-timed': ['1000'],
'pypy-chaos-timed': ['1000'],
'pypy-go-timed': ['50'],
'pypy-deltablue': ['2000'],
}
pythonBenchmarks = {
'binarytrees3t': ['18'],
'fannkuchredux3t': ['11'],
'fasta3t': ['25000000'],
'mandelbrot3t': ['4000'],
'meteor3t': ['2098'],
'nbody3t': ['5000000'],
'spectralnorm3t': ['3000'],
'pidigits-timed': ['0'],
'euler31-timed': ['200'],
'euler11-timed': ['10000'],
'ai-nqueen-timed': ['10'],
'pads-eratosthenes-timed': ['100000'],
'pads-integerpartitions': ['700'],
'pads-lyndon': ['100000000'],
'richards3-timed': ['200'],
'bm-float-timed': ['1000'],
'pypy-chaos-timed': ['1000'],
'pypy-go-timed': ['50'],
'pypy-deltablue': ['2000'],
'python-graph-bench': ['200'],
'simplejson-bench': ['10000'],
'sieve': ['100000'],
# 'whoosh-bench' : '5000',
# type not supported to adopt to Jython! <scoring.WeightScorer...
# 'pymaging-bench' : '5000',
# Multiple super class is not supported yet! + File "JYTHON.jar/Lib/abc.py", line 32, in abstractmethod
# AttributeError: 'str' object has no attribute '__isabstractmethod__'
# 'sympy-bench' : '20000',
# ImportError: No module named core
}
# ----------------------------------------------------------------------------------------------------------------------
#
# the python micro benchmarks
#
# ----------------------------------------------------------------------------------------------------------------------
# TODO: commented out benchmarks are probably too slow atm, revisit this at a later time once performance picks up
pythonMicroBenchmarks = {
'arith-binop': [],
'attribute-access': [],
'attribute-access-polymorphic': [],
# 'attribute-bool': [],
# 'boolean-logic': [],
'builtin-len': [],
'builtin-len-tuple': [],
'call-method-polymorphic': [],
'for-range': [],
'function-call': [],
'generator': [],
'generator-notaligned': [],
'generator-expression': [],
'genexp-builtin-call': [],
'list-comp': [],
'list-indexing': [],
'list-iterating': [],
'math-sqrt': [],
# 'object-allocate': [],
# 'object-layout-change': [],
# 'special-add': [],
# 'special-add-int': [],
# 'special-len': [],
}
# XXX: testing
# pythonBenchmarks = {
# 'binarytrees3t' : ['8'],
# 'mandelbrot3t' : ['300'],
# 'ai-nqueen-timed' : ['5'],
# }
# pythonMicroBenchmarks = {
# 'arith-binop' : [],
# 'for-range' : [],
# }
pythonInteropBenchmarks = {
'cext-modulo': [],
'for-range-cext': [],
}
# helper list
benchmarks_list = {
"normal": [pathBench, pythonBenchmarks],
"micro": [pathMicro, pythonMicroBenchmarks],
"generator": [pathBench, pythonGeneratorBenchmarks],
"object": [pathBench, pythonObjectBenchmarks],
"interop": [pathInterop, pythonInteropBenchmarks],
}