-
Notifications
You must be signed in to change notification settings - Fork 30
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 first draft of instrumented interpreter #713
base: master
Are you sure you want to change the base?
Conversation
|
||
// doesn't work: product_early (since it SO due to run run run) | ||
|
||
val Some(main, mod, decl) = runFile("examples/benchmarks/effect_handlers_bench/triples.effekt"): @unchecked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can already experiment with it by changing the filename here and then running testOnly effekt.core.InterpreterTests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, here is the result of running triples
:
Static dispatches: 232
Dynamic dispatches: 231
Branches: 701
Pattern matches: 5
Frames (pushed: 405, popped: 530)
Allocations: 5
Closures: 112
Field lookups: 0
Variable reads: 0
Variable writes: 0
Installed delimiters: 1
Captured continuations: 347
Resumed continuations: 350
//println(Interpreter.show(stack)) | ||
} | ||
} | ||
Interpreter(data).run(main, inlined) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By changing this to
Interpreter(data).run(main, inlined) | |
Interpreter(data).run(main, gced) |
you can compare the numbers to those without inlining.
In this PR I develop a tracing interpreter for Core. This will allow us to: