• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Future of Ruby

 
Ranch Hand
Posts: 258
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ruby 2.6 and 2.7 have improvements for JIT compiler and GC.
How is Ruby performance in recent versions compared with other popular languages like Python, Java, etc.?
What about JRuby?

Thanks
 
Author
Posts: 3
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Raymond:

Ruby and Python performance metrics are similar because they're dynamic and interpreted at runtime. Even if Ruby 2.6 and 2.7 have made performance improvements (you're correct in saying they have), the difference in runtime speed is still negligible between the two languages. Ruby 3 has the audacious goal of being three times faster than Ruby 2. If/when that happens, Ruby may be faster than Python, but probably not so much faster that you should use it as the sole deciding factor of which language to use.

Regardless of whether Ruby 3 achieves its goal, Java is and will remain faster at runtime. Java is a statically-typed, compiled language, which gives it distinct speed advantages at runtime. JRuby's speed metrics are similar because it also runs on the JVM, though anecdotal evidence suggests it is still a bit slower at certain tasks than Java.
 
Raymond Tong
Ranch Hand
Posts: 258
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your comment. Did not know there is Ruby 3 and hope it would not like Python 3 with a not backward compatible syntax.
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might like the keynote Matz gave at Bath Ruby last year - in the second half (from 25 mins or so in) he spends some time talking about the future of Ruby and Ruby 3, and he's clear that they don't want a big jump between 2 and 3, so they are trying to introduce new stuff (like the 2.6/2.7 improvements) gradually to avoid a Python 2 vs 3 situation.

https://www.youtube.com/watch?v=XXxAvDRPzA4
 
Anna Baik
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops - the bit where he's talking about avoiding a Big Gap between Ruby 2 & 3 is around 46 minutes in.
 
Bartender
Posts: 669
15
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Leo wrote:
Java is and will remain faster at runtime.



If it's faster then why do some people use node or python for a web server?  
 
Joe Leo
Author
Posts: 3
6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, because Node, Python, and Ruby are typically "fast enough" for the needs of a web server. Despite being faster at runtime, it will typically take longer to build, deploy, and maintain a Java application. A Java developer will write more code and wait longer (for the code to compile hundreds or thousands of times) to build and maintain her application. The dynamic nature of Ruby allows her to build an application and iterate on it faster, which speeds time to market, time to get feedback from users, and lowers the burn rate of cash used to pay the developer for her time. So asking "is this language fast enough for the task at hand?" is typically a better question than "what is the language with the fastest runtime?"
 
reply
    Bookmark Topic Watch Topic
  • New Topic