Re:How to Fix Slow Code in Ruby
by meesterdude on Thursday May 14, 2020 @03:16PM
(#23184060)
I've seen conflicting benchmarks on this showing different results - possibly has changed over time, or run different comparisons. What you linked seems current at least.
[ Parent
| on HN ]
Also keep in mind that as far as performance of dynamic languages goes, all of the P* languages (Perl, Python, PHP, and... Ruby ;)) have been left in the dust by the front-runners (eg Node.js or LuaJIT). Perl used to be king a long time ago, eventually, PHP took pole position, and maybe now it's Ruby's time to shine. But being leader of that particular pack could mean you're nevertheless still 'slow' depending on context.
I wouldn't put node in with luajit. Luajit is about 4x faster than v8 JavaScript. So it's still in the slow category
Depends on the benchmark. Eg at the bottom of this page [1] can be found a simple fib(40) comparison of a few runtimes.
The Node time is at 2.6x the LuaJIT time, which I'd still consider in the same ballpark compared to eg the factor of 31x achieved by Python3.
[1] https://github.com/wasm3/wasm3/blob/master/docs/Performance....
Re:How to Fix Slow Code in Ruby
by stevebmark on Thursday May 14, 2020 @05:48PM
(#23185979)
No, both your post and this reply are dogmatic. As I said, Ruby is the slowest modern dynamic programming language (and it's much slower than Perl). I really wish the Ruby community would listen to valid criticism. All dynamic languages are deeply flawed in some way, especially Ruby, and most ecosystems are open to learning from others.
Re:How to Fix Slow Code in Ruby
by meesterdude on Friday May 15, 2020 @07:16AM
(#23190845)
> All dynamic languages are deeply flawed in some way, especially Ruby
That sounds pretty dogmatic itself. You don't have to like dynamic languages - but that doesn't mean they are deeply flawed. The same could be said for statically typed languages with a different set of values.
> …much slower than Perl
To do some things but not others?
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...