-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Hi there,
I was wondering if you'll be ever considering any other JIT option apart from asmjit. The rationale:
- asmjit still requires you to write assembler by hand in the VM;
- miscellaneous architecture support. I've read the comments you didn't plan to add anything but amd64 initially, but people are already wondering about risc-v (Erlang RISC-V Architecture JIT Support #7498), and this list can only increase in the future. With asmjit (which's an amazing library without a doubt) you're limited to its architecture support, which is rather scarce. Given excellent OTP portability, it seems to me that having universal JIT would increase platform adoption much more.
So the question is would you consider implementing something like copy-and-patch JIT? For example, that's how they did it in Python:
python/cpython#113465 (first comment also contains links to the original paper, talk and slides)
I understand that changing JIT backend is by no means an easy task. For example, OTP has been historically running well on SPARC architecture, but the only option to increase performance was HiPe, which has been removed from upstream. With copy-and-patch, you would get beyond-HiPe levels of performance without the extra maintenance burden as of all heavy lifting is done by C compiler, and only very small portion of platform-specific code is required for the initial setup.
Thank you!