News for hackers. Stuff that matters.
Re:How to Fix Slow Code in Ruby by cygx on Thursday May 14, 2020 @03:28PM (#23184206)
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.
Re:How to Fix Slow Code in Ruby by VWWHFSfQ on Thursday May 14, 2020 @04:03PM (#23184645)
I wouldn't put node in with luajit. Luajit is about 4x faster than v8 JavaScript. So it's still in the slow category
Re:How to Fix Slow Code in Ruby by cygx on Thursday May 14, 2020 @04:20PM (#23184867)
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....