is ruby really slow?

Hello,

I am new to ruby.
I heard people saying ruby is slow.
Is it really slower than other interpretive languages such as python or perl?

Thank you.

Welcome to Ruby, a language with a focus on developer happiness that enables both new and experienced developers to be productive. As with many interpreted languages, speed will depend on application and if libraries are used, the implementations in the libraries. Interpreted languages usually enable greater programmer productivity. Programming languages typically have tools that make solving some kinds of tasks easier, so choose the programming language depending on your needs. The community of programmers you can learn from and that develop the language will also be important in long term use of a language.

···

On 3/2/22 9:41 AM, linuxer wrote:

Hello,

I am new to ruby.
I heard people saying ruby is slow.
Is it really slower than other interpretive languages such as python or perl?

Thank you.

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

No, it's not. It is slower than some other languages some of the time depending on what you are using it for. However, Ruby has a rich ecosystem of libraries (gems) many of which either provide highly optimised Ruby code or include native extensions that run almost as fast as coding in a different language. For example, if you're parsing XML, you could use the built-in Ruby XML parser but there are options such as Ox or Nokogiri which are much, much faster.

If I were to be difficult, I'd reply to your questions say "slow.. for what?" but that is genuinely true - for the vast majority of users, for the vast majority of use cases, Ruby runs fast enough. You'll likely get more done sooner with Ruby once you're really using it.

Should you hit the cases where it really isn't fast enough for your needs, you'll have options:
* Try running your Ruby code with JRuby which is a Ruby implementation on the Java Virtual Machine and might outperform "regular" Ruby for long-running programs
* Use alternative/ optimised gems or native extensions that are able to leverage C/C++ or other language code to provide higher performing code for some aspects of your system
* Possibly, write some of your own code as a native extension
* Move to a different language - Crystal is a native compiled language with a syntax similar to Ruby and of course, there are other options.

Hit us up if you're really concerned about a specific use case :slight_smile:

If you're trying out JRuby, you might find my posts on JRuby helpful: Tags and if you're using RubyOnWindows, I try to write up stuff for that also: Tags to help other developers who are using Windows.

Best Regards,
Mohit.
2022-3-2 | 3:23 pm.

···

On 2022-3-2 2:41 pm, linuxer wrote:

Hello,

I am new to ruby.
I heard people saying ruby is slow.
Is it really slower than other interpretive languages such as python or perl?

> Hello,
>
> I am new to ruby.
> I heard people saying ruby is slow.
> Is it really slower than other interpretive languages such as python
> or perl?

Welcome Mohit !! :slight_smile:

"Ruby is slow" is mostly people talking s**t. Like people said it depends

···

On Tue, Mar 1, 2022 at 11:30 PM Mohit Sindhwani <mo_mail@onghu.com> wrote:

On 2022-3-2 2:41 pm, linuxer wrote:

on what you're using it for. As far as speed of development it's freaking awesome. If you want speed of execution time, you probably want to dial in exactly what kind of execution. For many of those scenarios there's lots of Ruby tools as people have said.

Hope you enjoy your stay !!

I use Ruby extensively for my personal and professional projects, and its not slow for me!

If you are new to Ruby can you checkout my book https://i-love-ruby.gitlab.io/ and give feedback so that I can make it better.

- Karthikeyan A K
+91 8428050777

···

Sent with ProtonMail secure email.

------- Original Message -------

On Wednesday, March 2nd, 2022 at 12:11 PM, linuxer <yonghua@laposte.net> wrote:

Hello,

I am new to ruby.

I heard people saying ruby is slow.

Is it really slower than other interpretive languages such as python or

perl?

Thank you.

Unsubscribe: mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe

http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk

Ruby is good enough for most of the applications. Isn't fast for 3D gaming
development, but neither are a lot of other languages.

Anyway there is a another alternative for JRuby: Truffle Ruby

···

Em qua., 2 de mar. de 2022 às 07:34, Karthikeyan A K < mindaslab@protonmail.com> escreveu:

I use Ruby extensively for my personal and professional projects, and its
not slow for me!

If you are new to Ruby can you checkout my book
https://i-love-ruby.gitlab.io/ and give feedback so that I can make it
better.

- Karthikeyan A K
+91 8428050777

Sent with ProtonMail secure email.

------- Original Message -------

On Wednesday, March 2nd, 2022 at 12:11 PM, linuxer <yonghua@laposte.net> > wrote:

> Hello,
>
> I am new to ruby.
>
> I heard people saying ruby is slow.
>
> Is it really slower than other interpretive languages such as python or
>
> perl?
>
> Thank you.
>
> Unsubscribe: mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe
>
> http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
Fellipe Fingoli

Ruby is slower than C/Rust/Go, but not slower than Python.

But that doesn't matter, in Web development, database query time and network transfer time eliminate this gap.

In my opinion, Ruby coding is faster than all of them, and that's enough :stuck_out_tongue:

------------------&nbsp;原始邮件&nbsp;------------------

···

发件人: "Ruby users" <yonghua@laposte.net&gt;;
发送时间:&nbsp;2022年3月2日(星期三) 下午2:41
收件人:&nbsp;"ruby-talk"<ruby-talk@ruby-lang.org&gt;;

主题:&nbsp;is ruby really slow?

Hello,

I am new to ruby.
I heard people saying ruby is slow.
Is it really slower than other interpretive languages such as python or
perl?

Thank you.

The question is "Is it fast enough for what you are doing?"

If you want a very fast language then something on the lines of C/C++,
Java, Ocaml or Erlang will server you best

Our company runs on Ruby. Only once has Ruby's performance been an issue
that forced us to use another language. That one part of our infrastructure
is written in Lua

And always remember that no matter how fast the language bad code will drag
it down

···

On Wed, 2 Mar 2022 at 15:30, Mark24 <mark.zhangyoung@qq.com> wrote:

Ruby is slower than C/Rust/Go, but not slower than Python.

But that doesn't matter, in Web development, database query time and
network transfer time eliminate this gap.

In my opinion, Ruby coding is faster than all of them, and that's enough :stuck_out_tongue:

------------------ 原始邮件 ------------------
*发件人:* "Ruby users" <yonghua@laposte.net>;
*发送时间:* 2022年3月2日(星期三) 下午2:41
*收件人:* "ruby-talk"<ruby-talk@ruby-lang.org>;
*主题:* is ruby really slow?

Hello,

I am new to ruby.
I heard people saying ruby is slow.
Is it really slower than other interpretive languages such as python or
perl?

Thank you.

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Yes thank you
Hi s does one get dragged into other conversations I don’t know.

Rgds
Robert

···

On Wed, Mar 2, 2022 at 2:05 AM Benson Muite <benson_muite@emailplus.org> wrote:

Welcome to Ruby, a language with a focus on developer happiness that
enables both new and experienced developers to be productive. As with
many interpreted languages, speed will depend on application and if
libraries are used, the implementations in the libraries. Interpreted
languages usually enable greater programmer productivity. Programming
languages typically have tools that make solving some kinds of tasks
easier, so choose the programming language depending on your needs. The
community of programmers you can learn from and that develop the
language will also be important in long term use of a language.

On 3/2/22 9:41 AM, linuxer wrote:
> Hello,
>
> I am new to ruby.
> I heard people saying ruby is slow.
> Is it really slower than other interpretive languages such as python or
> perl?
>
> Thank you.
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Hello. 10-12 years ago I would have chosen Perl rather than Ruby for web development based on the speed ( but not by usability ). Maybe the opinion you heard comes from those times. But today Ruby match faster and, many thanks to the authors of the language and interpreter. It is also important to note the development of the Rails web framework.

02.03.2022 09:41, linuxer пишет:

···

Hello,

I am new to ruby.
I heard people saying ruby is slow.
Is it really slower than other interpretive languages such as python or perl?

Thank you.

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Some good Apps were developed by JRuby, such as Flume and Logstash.
They use JRuby rather than the native ruby due to the performance stuff?

Thanks.

···

On 2022/3/2 7:54 , Fellipe Fingoli wrote:

Anyway there is a another alternative for JRuby: Truffle Ruby

I'd be curious what part of your app that is, and why/how you chose Lua to replace it.

···

On Mar 2, 2022, at 08:04, Peter Hickman <peterhickman386@googlemail.com> wrote:

Our company runs on Ruby. Only once has Ruby's performance been an issue that forced us to use another language. That one part of our infrastructure is written in Lua

Hi Sean,

Happy to be re-welcomed :slight_smile: though I've been here since 2005.

···

On 2022-3-2 4:45 pm, Sean Felipe Wolfe wrote:

Welcome Mohit !! :slight_smile:

"Ruby is slow" is mostly people talking s**t. Like people said it depends on what you're using it for. As far as speed of development it's freaking awesome. If you want speed of execution time, you probably want to dial in exactly what kind of execution. For many of those scenarios there's lots of Ruby tools as people have said.

Hope you enjoy your stay !!

I think you replied to my mail and it looked like it was me asking the question - but yes, I completely agree with your thoughts.

Best Regards,
Mohit.
2022-3-3 | 6:25 pm.

Hi again!

Some good Apps were developed by JRuby, such as Flume and Logstash.
They use JRuby rather than the native ruby due to the performance stuff?

Thanks.

It could be for a number of reasons - Ruby code running in JRuby (or TruffleRuby) is _still_ Ruby code. It's just running on a different interpreter. Some of these tools run on JRuby because they can benefit from the following:
* Very easy integration with other Java code and libraries
* Long-running code often benefits from things built into the Java Virtual Machine for performance
* In some cases, running Java on a server might be easier or more acceptable than running Ruby (e.g. within enterprise IT systems)

Best Regards,
Mohit.
2022-3-3 | 6:29 pm.

···

On 2022-3-3 8:56 am, linuxer wrote: