Skip to content

Cheap synchronous Rust calls #126

@janpaul123

Description

@janpaul123

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Soon

Relationships

None yet

Development

No branches or pull requests

Issue actions