Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more microbenchmarks to assess interpreter performance #121

Merged
merged 5 commits into from
Jun 16, 2024

Conversation

smarr
Copy link
Member

@smarr smarr commented Jun 15, 2024

First this PR reorganizes the benchmarks introduced in #119 and renames them.

Benchmarks now try to consistently use a name that roughly describes the expression that is evaluated in the loop body.

Each benchmark follows the same structure that tries to focus the execution of a particular expression. It is executed 30 times inside a loop, which hopefully should make sure that these expressions dominate the overall execution time.

The current micro, or perhaps rather nanobenchmark set is:

Benchmark Expression Description
ArgRead arg read a method argument
ArrayReadConst arr at: 1 read a method argument
ArrayWriteConstConst arr at: 1 put: 2 write a constant to an array at contant index
BlockSend0ConstReturn [ 0 ] value activate block that evaluates to constant
Const 42 read a literal
FieldConstWrite field := 1 write a constant to field
FieldRead field read field
FieldReadIncWrite field := field + 1 read, add 1, and write to a field
FieldReadWrite field := field read field and write to field
GlobalRead GlobalRead read global
LocalConstWrite local := 1 write constant to local
LocalRead local read local variable
LocalReadIncWrite local := local + 1 read, add 1, and write to a local
LocalReadWrite local := local read and write local
SelfSend0 self trivial self send message without argument to trivial = ( ^ 1 )
SelfSend0BlockConstNonLocalReturn self trivial self send message, which returns nonlocally from an embedded block: trivial = ( [ ^ 42 ] value )

Core-Lib Updates

Status SOM PR
SOM (java) SOM-st/som-java#36
TruffleSOM SOM-st/TruffleSOM#205
PySOM SOM-st/PySOM#61
JsSOM SOM-st/JsSOM#17
SOM-RS Hirevo/som-rs#46

@smarr smarr added the enhancement Improves the implementation with something noteworthy label Jun 16, 2024
@smarr smarr merged commit 9c04914 into SOM-st:master Jun 16, 2024
6 checks passed
@smarr smarr deleted the interpreter-microbenchmarks branch June 16, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the implementation with something noteworthy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant