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

Cheap synchronous Rust calls #126

Open
janpaul123 opened this issue Mar 7, 2022 · 0 comments
Open

Cheap synchronous Rust calls #126

janpaul123 opened this issue Mar 7, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request flux

Comments

@janpaul123
Copy link
Contributor

janpaul123 commented Mar 7, 2022

Right now callRustSync is optimized for the case of few calls, with lots of data per call. With Flux we're seeing the opposite pattern: lots of calls with just a few f64 numbers per call.

Currently the overhead consists of:

  • Having a function name string for each call. We should probably make a separate wasm export for every function, instead of bundeling it all in one wasm export.
  • Creating a buffer with data. When passing in just a few numbers, it'd be nice if we can just pass them directly as function parameters. Separate ticket for this: ZapParam Number #134

For now the workaround is to batch calls to reduce the relative overhead, where possible.

@janpaul123 janpaul123 added the flux label Mar 7, 2022
@janpaul123 janpaul123 added this to the Basic stabilization milestone Mar 7, 2022
@janpaul123 janpaul123 self-assigned this Mar 7, 2022
@janpaul123 janpaul123 added the enhancement New feature or request label Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request flux
Projects
Status: Soon
Development

No branches or pull requests

1 participant