But not that is conceptually related, only that the copy-and-patch is faster than cranelift in that particular scenario.
Featuring self-modifying code - it can repatch emitted instruction at runtime based on the current value type.
Here is a function that I use for exactly this: https://gist.github.com/fikovnik/e0fa86aea29f761b6a4ddcfda46...
But not that is conceptually related, only that the copy-and-patch is faster than cranelift in that particular scenario.
Featuring self-modifying code - it can repatch emitted instruction at runtime based on the current value type.
Here is a function that I use for exactly this: https://gist.github.com/fikovnik/e0fa86aea29f761b6a4ddcfda46...