-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 sub_linker()
API
#2992
Comments
Oh wow I completely forgot that |
I always assumed that the most expensive part of adding host functions was the trampoline creation, and this would be faster with cloning, instead of recreating The previous api Thanks for the super fast response! |
Whether or not it's fast sort of depends on your use case and which part you're stressing. Want to try out the |
I ran some benchmarks with the This is still significantly better than what we do right now, re-creating the Linker from scratch (15x slower), because we need to use different The only issues is that it keeps getting worse if I artificially increase the number of host functions (with 200 the throughput decreases 50%). I expect the number of host functions to further grow in our system. I would still love to see a |
The RFC 11 mentions an addition of
sub_linker
.It was not added yet, but it would be nice to have for my use case. I define a lot of host functions in the
Linker
, but then for eachStore
add a different module as an import. This immediately "poisons" the Linker with a particularStore
and I need to re-add all the host functions again to a newLinker
for otherStore
s.Maybe, just having
Clone
on theLinker
would be enough here.The text was updated successfully, but these errors were encountered: