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

Re-enable R's bytecode interpreter #458

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Re-enable R's bytecode interpreter #458

wants to merge 1 commit into from

Conversation

georgestagg
Copy link
Member

Improvements to R's bytecode interpreter (TCO, more efficient use of stack space - thanks Luke!) mean it's now feasible to run it under Wasm by default. The R Wasm binary still grows a lot when the interpreter is included (by about 2MB!), but the reduction in complexity of our changes to R and potentially better runtime performance should make it worth it.

In particular, this might allow Shiny to run under Wasm without requiring hacks to reduce the size of the call stack.

Some things to be done before this can be merged:

[ ] - Run some benchmarks, get some real numbers on performance impact.
[ ] - Compare maximum depth with & without bytecode, e.g. rec <- function(n){print(n); n * rec(n+1)}; rec(0)
[ ] - Confirm loading non-byte-compiled Wasm R packages still works OK with this PR.
[ ] - Confirm loading byte-compiled Wasm packages works OK in previous releases of webR.
[ ] - Update {rwasm} to start byte-compiling R packages during cross-compilation.
[ ] - (Optional) Refresh https://repo.r-wasm.org for byte-compiled packages.
[ ] - Test byte-compiled Shiny under Wasm.

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