Skip to content

Add inlining for #to:do: loops#36

Merged
smarr merged 2 commits intoSOM-st:masterfrom
smarr:inline-to-do
Aug 2, 2024
Merged

Add inlining for #to:do: loops#36
smarr merged 2 commits intoSOM-st:masterfrom
smarr:inline-to-do

Conversation

@smarr
Copy link
Copy Markdown
Member

@smarr smarr commented Aug 2, 2024

This is based on SOM-st/PySOM#35 which was never merged because of the impact on the JIT compiler.
Though, since we have a pure interpreter here, it's a good win on benchmarks that use a #to:do: loop.

The median run time is reduced by only 2% though.

https://rebench.dev/SOMpp/compare/692cc6c47727a7fa76923daf92e0bb8c7d4be3b1..252923132894fff18b7d1364dfb2981f439f146c

smarr added 2 commits August 2, 2024 12:47
This adds some new bytecodes:
 - DUP_SECOND
 - INC
 - JUMP_IF_GREATER
 - JUMP2_IF_GREATER

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
@smarr
Copy link
Copy Markdown
Member Author

smarr commented Aug 2, 2024

@smarr smarr merged commit 7490bff into SOM-st:master Aug 2, 2024
@smarr smarr deleted the inline-to-do branch August 2, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant