Skip to content

Commit fdc0430

Browse files
authored
Add more interpreter microbenchmarks (#61)
2 parents 09f6706 + 475b48f commit fdc0430

File tree

3 files changed

+47
-16
lines changed

3 files changed

+47
-16
lines changed

.gitlab-ci.yml

+21-15
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ before_script:
2020
build:aarch64-test-and-rebench:
2121
stage: build-test
2222
tags: [zullie1]
23-
23+
2424
script:
2525
- export PATH=/opt/local/bin:/opt/local/sbin:/Users/gitlab-runner/Library/Python/3.12/bin:${PATH}:${PYPY_BIN_DIR}
2626

@@ -43,10 +43,9 @@ build:aarch64-test-and-rebench:
4343
- SOM_INTERP=AST $RPYTHON --batch src/main_rpython.py
4444
- ./som-ast-interp -cp Smalltalk TestSuite/TestHarness.som
4545
- ./som-ast-interp -cp Smalltalk:TestSuite Examples/Benchmarks/TestSuite/TestTestSuite.som
46-
47-
- (cd Examples/Benchmarks/TestSuite && ./duplicate-tests.sh)
46+
47+
- (cd Examples/Benchmarks/TestSuite && ./duplicate-tests.sh)
4848
- rebench --experiment="CI ID $CI_PIPELINE_ID" --branch="$CI_COMMIT_REF_NAME" -c rebench.conf
49-
5049

5150
build-and-test-interpreters:
5251
stage: build-test
@@ -66,21 +65,20 @@ build-and-test-interpreters:
6665
- ./som-bc-interp -cp Smalltalk:TestSuite Examples/Benchmarks/TestSuite/TestTestSuite.som
6766

6867
- export SOM_INTERP=AST
69-
68+
7069
# Unit Tests
7170
- PYTHONPATH=src python3 -m pytest
7271
- ./som.sh -cp Smalltalk TestSuite/TestHarness.som
73-
72+
7473
# Interpreter
7574
- $RPYTHON --batch src/main_rpython.py
7675
- ./som-ast-interp -cp Smalltalk TestSuite/TestHarness.som
7776
- ./som-ast-interp -cp Smalltalk:TestSuite Examples/Benchmarks/TestSuite/TestTestSuite.som
7877

79-
8078
# Package and Upload
8179
- lz4 som-ast-interp som-ast-interp.lz4
8280
- lz4 som-bc-interp som-bc-interp.lz4
83-
81+
8482
- |
8583
sftp tmp-artifacts << EOF
8684
-mkdir incoming/${CI_PIPELINE_ID}/
@@ -94,7 +92,7 @@ build-and-test-jit-bc:
9492
script:
9593
- export PATH=$PATH:$PYPY_BIN_DIR
9694
- export SOM_INTERP=BC
97-
95+
9896
# JIT Compiled Version
9997
- $RPYTHON --batch -Ojit src/main_rpython.py
10098
- ./som-bc-jit -cp Smalltalk TestSuite/TestHarness.som
@@ -103,7 +101,7 @@ build-and-test-jit-bc:
103101

104102
# Package and Upload
105103
- lz4 som-bc-jit som-bc-jit.lz4
106-
104+
107105
- |
108106
sftp tmp-artifacts << EOF
109107
-mkdir incoming/${CI_PIPELINE_ID}/
@@ -116,7 +114,7 @@ build-and-test-jit-ast:
116114
script:
117115
- export PATH=$PATH:$PYPY_BIN_DIR
118116
- export SOM_INTERP=AST
119-
117+
120118
# JIT Compiled Version
121119
- $RPYTHON --batch -Ojit src/main_rpython.py
122120
- ./som-ast-jit -cp Smalltalk TestSuite/TestHarness.som
@@ -125,7 +123,7 @@ build-and-test-jit-ast:
125123

126124
# Package and Upload
127125
- lz4 som-ast-jit som-ast-jit.lz4
128-
126+
129127
- |
130128
sftp tmp-artifacts << EOF
131129
-mkdir incoming/${CI_PIPELINE_ID}/
@@ -134,13 +132,15 @@ build-and-test-jit-ast:
134132
135133
benchmark-y1:
136134
stage: benchmark
135+
needs:
136+
[build-and-test-interpreters, build-and-test-jit-bc, build-and-test-jit-ast]
137137
tags: [yuria]
138138
script:
139139
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-ast-jit.lz4
140140
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-ast-interp.lz4
141141
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-bc-jit.lz4
142142
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-bc-interp.lz4
143-
143+
144144
- lz4 -d som-ast-jit.lz4 som-ast-jit
145145
- lz4 -d som-ast-interp.lz4 som-ast-interp
146146
- lz4 -d som-bc-jit.lz4 som-bc-jit
@@ -151,13 +151,15 @@ benchmark-y1:
151151

152152
benchmark-y2:
153153
stage: benchmark
154+
needs:
155+
[build-and-test-interpreters, build-and-test-jit-bc, build-and-test-jit-ast]
154156
tags: [yuria2]
155157
script:
156158
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-ast-jit.lz4
157159
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-ast-interp.lz4
158160
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-bc-jit.lz4
159161
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-bc-interp.lz4
160-
162+
161163
- lz4 -d som-ast-jit.lz4 som-ast-jit
162164
- lz4 -d som-ast-interp.lz4 som-ast-interp
163165
- lz4 -d som-bc-jit.lz4 som-bc-jit
@@ -168,13 +170,15 @@ benchmark-y2:
168170

169171
benchmark-y3:
170172
stage: benchmark
173+
needs:
174+
[build-and-test-interpreters, build-and-test-jit-bc, build-and-test-jit-ast]
171175
tags: [yuria3]
172176
script:
173177
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-ast-jit.lz4
174178
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-ast-interp.lz4
175179
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-bc-jit.lz4
176180
- sftp tmp-artifacts:incoming/${CI_PIPELINE_ID}/som-bc-interp.lz4
177-
181+
178182
- lz4 -d som-ast-jit.lz4 som-ast-jit
179183
- lz4 -d som-ast-interp.lz4 som-ast-interp
180184
- lz4 -d som-bc-jit.lz4 som-bc-jit
@@ -185,6 +189,8 @@ benchmark-y3:
185189

186190
report-completion:
187191
stage: benchmark-completion
192+
needs:
193+
[benchmark-y1, benchmark-y2, benchmark-y3, build:aarch64-test-and-rebench]
188194
tags: [yuria]
189195
script:
190196
- rebench --experiment="CI ID $CI_PIPELINE_ID" --report-completion rebench.conf

rebench.conf

+25
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,29 @@ benchmark_suites:
132132
- SomParse: {extra_args: 1, machines: [yuria2]}
133133
- SomInit: {extra_args: 10000, machines: [yuria2]}
134134

135+
interpreter:
136+
description: Basic interpreter benchmarks for comparing performance of most basic concepts.
137+
gauge_adapter: RebenchLog
138+
invocations: 5
139+
command: "-cp Smalltalk:Examples/Benchmarks/Interpreter Examples/Benchmarks/BenchmarkHarness.som %(benchmark)s %(iterations)s 1"
140+
benchmarks:
141+
- ArgRead: {machines: [yuria ]}
142+
- ArrayReadConst: {machines: [yuria ]}
143+
- ArrayWriteConstConst: {machines: [yuria ]}
144+
- BlockSend0ConstReturn: {machines: [yuria ]}
145+
- Const: {machines: [yuria ]}
146+
- FieldConstWrite: {machines: [yuria ]}
147+
- FieldRead: {machines: [yuria ]}
148+
- FieldReadIncWrite: {machines: [yuria ]}
149+
- FieldReadWrite: {machines: [yuria ]}
150+
- GlobalRead: {machines: [yuria ]}
151+
- LocalConstWrite: {machines: [yuria ]}
152+
- LocalRead: {machines: [yuria ]}
153+
- LocalReadIncWrite: {machines: [yuria ]}
154+
- LocalReadWrite: {machines: [yuria ]}
155+
- SelfSend0: {machines: [yuria ]}
156+
- SelfSend0BlockConstNonLocalReturn: {machines: [yuria ]}
157+
135158
executors:
136159
RPySOM-ast-interp:
137160
path: .
@@ -167,12 +190,14 @@ experiments:
167190
- macro-startup
168191
- awfy-startup
169192
- som-parse
193+
- interpreter
170194
- RPySOM-bc-interp:
171195
suites:
172196
- micro-startup
173197
- macro-startup
174198
- awfy-startup
175199
- som-parse
200+
- interpreter
176201
- RPySOM-ast-jit:
177202
suites:
178203
- micro-startup

0 commit comments

Comments
 (0)