-
Notifications
You must be signed in to change notification settings - Fork 165
C API - faster calls #397
Comments
The short answer is that currently, there is no pre-resolved API (even for non-C users of lucet-runtime). Out of curiosity, about how many functions are in the wasm module you're resolving out of? 10 milliseconds is pretty slow, but that sounds about right from that API in the worst circumstances. Either way, there should be a faster API, but it hasn't been exposed yet. It sounds like you might have taken a look at So to expose a pre-resolved
If you'd like to put a PR together to do the above, that would be fantastic! I'd be happy to work with you on that. I'm not sure when we'll get to this, otherwise. |
Just a couple of functions. The idea is to resolve the functions only once and to call them a lot. There is |
That said, if you can add functions to the wasm table you could use the index you know them to be at for |
As I understand
lucet_instance_run
is the only way of calling a wasm function from the a C "host". It "resolves" the function and makes a call to it. Unfortunately this API is extremely slow (~ 10 milliseconds in my case). Is there a way to resolve a function "in advance" and to make fast calls to it later?The text was updated successfully, but these errors were encountered: