The Crystal Programming Language Forum

Ruby is about to get JIT (just in time) compilation support

What you guys thinking on possible complications for Crystal adoption rate?

I think Crystal offers so much already that we may still see a huge adoption even if it’s not as a major language. I could see people offloading tiny parts of their ruby stuff over to crystal still. And personally, I enjoy with in Lucky way more than Rails these days now :smile: But yeah, Ruby 3 is gonna be awesome!

2 Likes

My team, a professional RoR developers, switched to Crystal quite fast and first Crystal/Amber (should I named it Cramber :laughing: ) project was done only 30% slower (that did included time to learn Crystal and Amber) than if they would do it on RoR.

It will be interesting to see in comparison Crystal and Ruby JIT.

2 Likes

CRAMBER!! Love it :heart: :laughing:

2 Likes

And CLUCKY! :laughing:

2 Likes

YES! Time for a name change! :joy:

1 Like

Ruby has JIT since 2.6. Any cool changes coming in Ruby 3.0 for JIT?

Or is it just another pun from Aaron? :thinking:

Good to know! I should look at recent Ruby interpreter code to see how did they implement it there.

The problem with current Ruby JIT is that it has very high startup cost making it almost unusable (real Rails app will probably run slower with JIT enabled).

Good overview https://developers.redhat.com/blog/2020/01/20/mir-a-lightweight-jit-compiler-project/

The article also describes MIR project by Vladimir Makarov, which could be a very exciting news for Ruby JIT if MIR proves to be success. That’s however is yet to be seen and there is no ETA.

MIR looks similar to GraalVM from Oracle/Sun: https://www.graalvm.org/

I don’t adopt Crystal not because of some JIT, but for me, Ruby typing and it’s community are better.

This is only my personal preference but, Crystal take away productivity features of Ruby namely duck typing/dynamic typing.

Ruby is more productive because it allow partially incorrect code to be executed, and the REPL let’s people test their assumption in small chunk leading to bug free end product, the reusability of libraries are by far greater because of its typing. (For instance, I don’t use ActiveRecord but ActiveModel let’s me leverage all gems that support ActiveRecord)

And even with some library binding from the community, the official support from tech company isn’t there. (e.g. MongoDB)

The only thing Crystal seems to better than Ruby is the concurrency stuffs.

My context is, mostly, I’m working on an enterprise software. My opinion may changes if I use Crystal in some other area.

JIT or not is not a deal breaker for me.

My literately 2 cents.

1 - Ruby unless it has a llvm backend I don’t think it will match Crystal, and I believe crystal offers more out of the box and way more many applications. Literally build once deploy anywhere at least compare to Ruby.

2 - Crystal should have been v1 by now, it would have left Ruby as a language a thing of the past IMO

I love Ruby but I’m more enamored with a Crystal, I have to live with this unfaithful relationship every day

1 Like