Speed up getting and setting funcref elements/fields in GC objects #9347
Labels
cranelift:goal:optimize-speed
Focus area: the speed of the code produced by Cranelift.
performance
wasmtime:ref-types
Issues related to reference types and GC in Wasmtime
We don't keep
VMFuncRef
pointers inside the GC heap, as the GC heap is untrusted, and instead have a side table, and store table IDs in GC objects. We currently use libcalls to do id-to-funcref conversion when reading afuncref
out from a GC object and to intern afuncref
and get its associated table ID when writing thefuncref
into a GC object. libcalls on field/element access are very much not ideal from a performance perspective.I wrote up some thoughts on how we could improve the situation in the original PR:
Originally posted by @fitzgen in #9341 (comment)
The text was updated successfully, but these errors were encountered: