Announcement

Collapse
No announcement yet.

Ruby 2.6 Preview Rolls Out With JIT Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ruby 2.6 Preview Rolls Out With JIT Support

    Phoronix: Ruby 2.6 Preview Rolls Out With JIT Support

    The first preview release of Ruby 2.6 is now available and its big change compared to its earlier releases is a just-in-time (JIT) compiler...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    I thouht Ruby died off years ago. I generally hear zip about it.

    Comment


    • #3
      The Ruby 2.6 JIT compiler is designed to improve the performance of program execution -- its approach used is converting to C code, dumping to the disk, and uses a C compiler (GCC or Clang) to generate the native code.
      Seems like they do not have enough manpower left to implement this properly?
      In the days of llvm no one should be forced to go this route.

      It seems quite interesting how high Ruby was hyped during the early 2010s - while now it more or less has vanished.
      Even Sun/Oracle found itself pushed to release a (great, btw) Java implementation, to keep up with what was considered "cool" at that time.

      Comment


      • #4
        /me still codes in Ruby almost every day. Just saying.

        Comment


        • #5
          I find Ruby mostly gets a bad rap from people who don't know anything about it or people who still think it performs terribly. It's improved a lot in 10 years. True, it'll probably never be as fast as PHP or JavaScript but the gap is a lot smaller these days and I'm willing to make that trade off.

          Comment


          • #6
            Originally posted by wizard69 View Post
            I thouht Ruby died off years ago. I generally hear zip about it.
            It's a mature framework, Rails that is. Works as advertised.
            Haven't found anything that can really compete. I have tried, Zend, Angular, Flask and CodeIgniter.
            The main problem with Ruby imo is its patchy concurrency (treading) support.
            Elixir Phoenix has an interesting approach, it's on my todo list. I'm also tracking WebAssembler developments but that's still very experimental.

            Anybody with a Ruby (on Rails) background that has found something better?

            Comment


            • #7
              Originally posted by Chewi View Post
              I find Ruby mostly gets a bad rap from people who don't know anything about it or people who still think it performs terribly. It's improved a lot in 10 years. True, it'll probably never be as fast as PHP or JavaScript but the gap is a lot smaller these days and I'm willing to make that trade off.
              Well, without a JIT compiler you can't really compete with speed unless your interpreted code glues together large, high level native code functions. There is simply no way. Even if you are an expert coder, you can't fix it. Without a JIT you have a simple interpreter loop which is always much much slower than native code. It can typically slow down the code one hundred times or so. Here's an example of benchmarks where a fast Ruby implementation is 8 times faster than default Ruby 2.x. C/C++ are even faster, possibly with a speedup factor from 2 to 10.

              OTOH, the real question is, how much does the Ruby VM perf affect the total system performance. Web pages usually rely quite heavily on caching.
              Last edited by caligula; 03 June 2018, 05:37 PM.

              Comment


              • #8
                Ruby is still surprisignly popular. I should really try to learn it one of these days.

                Comment


                • #9
                  Originally posted by caligula View Post
                  Well, without a JIT compiler you can't really compete with speed unless your interpreted code glues together large, high level native code functions. There is simply no way. Even if you are an expert coder, you can't fix it. Without a JIT you have a simple interpreter loop which is always much much slower than native code. It can typically slow down the code one hundred times or so. Here's an example of benchmarks where a fast Ruby implementation is 8 times faster than default Ruby 2.x. C/C++ are even faster, possibly with a speedup factor from 2 to 10..
                  Of course, I admitted as much, I'm just saying that despite the lack of JIT, it's still a lot faster now than it was 10 years ago. Hopefully the JIT will help to close the gap further.

                  It's not like MRI (the official implementation) is the only option either, if you want Ruby with better performance right now, there is JRuby which benefits from better threading and no Global Interpreter Lock. We use this in production to handle phone calls with FreeSWITCH. We're probably also going to put our main Rails application on JRuby because multiple worker processes don't scale as well as threads.

                  Comment


                  • #10
                    Originally posted by Chewi View Post
                    /me still codes in Ruby almost every day. Just saying.
                    Take a look at Crystal.. you will like it.

                    Comment

                    Working...
                    X