3 ms·
It looks like Mir's approach to this is to build a jit compiler that has access to the C source of the standard library and can inline it into the JITted code o
by HALtheWise 7y ago
It looks like Mir's approach to this is to build a jit compiler that has access to the C source of the standard library and can inline it into the JITted code of Ruby functions, and vice versa. Building a compiler that can handle mixed-language input might be easier than rewriting the standard Library to all be in one language.
- jashmatthews 7y ago"inlining everything" is actually maybe not the best approach. It's been talked about a lot, but it's not always helpful. For example, C compilers (or LLVM) are unable to optimize boxing and then unboxing a double into a Ruby Flonum and back.
- pizlonator 7y agoExactly. You need a compiler that can reason about Ruby semantics. Llvm can’t. Not sure MIR will do any better. The key is: - large opcode set and an architecture that tries to amortize the pain of lots of opcodes. - excellent support for speculation and effects analysis.
- beagle3 7y agoAnd maybe it is. GP, chrisseaton did that in Truffle/Graal and its the fastest ruby there is.