4 ms·
There was already a JIT since Ruby 2.6, the MJIT: https://k0kubun.medium.com/ruby-3-0-jit-and-beyond-4d9404ce33c https://k0kubun.medium.com/ruby-3-0-jit-and-bey
by mappu 5y ago
There was already a JIT since Ruby 2.6, the MJIT: https://k0kubun.medium.com/ruby-3-0-jit-and-beyond-4d9404ce33c https://k0kubun.medium.com/ruby-3-0-jit-and-beyond-4d9404ce3...
The author of that article (k0kubun) is also one of the reviewers on this PR.
What is the difference between the two JITs?
- pjmlp 5y agoThis one is a proper JIT, whereas the former generated C code, called the C compiler on it, and then loaded the generated code as shared object. You can imagine how much it actually helped in the end. Whatever the native code might help was let down due to the lantency of doing all that work.
- montblanc 5y agoBut you do the process you described only once per "warmed up" method right? Yes it sound expensive but once it's warmed up it should be as good as YJIT or am I missing something?
- pjmlp 5y ago"Why Ruby's JIT was slow" talk at RubyKaigi 2021. https://www.youtube.com/watch?v=db3GHHllRyQ https://www.youtube.com/watch?v=db3GHHllRyQ