3 ms·
Yes, it was introduced in Ruby 2.6 (2018): https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/ https://www.ruby-lang.org/en/news/2018/12/25/ruby-2
by anonova 6y ago
Yes, it was introduced in Ruby 2.6 (2018): https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/ https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-rele...
- pizza234 6y agoWell, yes and no (althought the question is a bit open). It's more or less beta quality, and very primitive. It's discouraged to be used with Rails, so I'd be inclined to state that "we didn't get it yet". I'm also personally skeptical that the unusual approach (invoking a whole C compiler in a separate thread) will stand in the long term - but that's my own take.
- jashmatthews 6y agoThe CRuby JIT is stable but whether it improves performance or not is workload dependent. It's simple not primitive. MJIT is designed to take advantage of a C compilers optimization. "Compile to C" worked for Chicken Scheme for the past 20 years and continues to be a popular way for functional langauges to compile. It's also how Nim works. It's all about different trade-offs.
- oblio 6y agoChicken Scheme compiles ahead of time, doesn't it?
- pansa2 6y agoNim does too.
- jashmatthews 6y agoYeah but it's not an important distinction.
- oblio 6y agoIsn't it? Compiling C takes time, with Ruby you would be doing it for each execution. Is there some catching involved?
- jashmatthews 6y agoAlmost everything is in a pre-compiled header. Its actually similar overhead to an LLVM based JIT. You wouldn’t want to do it for a browser JIT but for a server side app it’s OK.
- oblio 6y agoDoes Ruby ship with a compiler? How will this work on Windows?
- pizza234 6y agoAre there any benchmarks available? It seems I can find very little (OptCarrot, some microbenchmarks, and some general assessments about usage with Rails), and a broad(er) overview is crucial to assess the overall performance (I suppose that you can have workloads where the performance degrades).