Live data from Hacker News

Is Ruby Fast Yet?

isrubyfastyet.com

11–20 of 95 posts

Re: Is Ruby Fast Yet?

#11
I'm surprised at how negative the comments are here. Graphing how different Ruby versions/implementations perform running Rails is very helpful! Glad to see that MRI continues to get faster with every version. Merry Christmas!

Re: Is Ruby Fast Yet?

#12

Wouldn't it make more sense to test various features of Ruby for comparison rather than comparing an entire web framework? Given that, the URL should be israilsfastyet.com, or more appropriately howdoesrailsbehaveonvariousrubyversions.com

Agreed. This is much more of a test of the rails framework then ruby

Re: Is Ruby Fast Yet?

#13
post #9

>Hardware: Mid-2007 MacBook Pro Wouldn't it make more sense to do this on generic server hardware with a LTS Linux OS? Once that vintage and customized MacBook bites the dust the website pretty much dies as well.

There's nothing magical about a Linux server. If you're arguing an LTS edition will run on newer hardware, well sure but the benchmarks will be just as incomparable.

You're right that theres nothing magical, but there is a clear advantage to faster disks, a more modern & faster CPU, newer & faster ram (this is running DDR2 in the benchmark), etc. I'd be curious why this particular machine was used for benchmarking, and if the same benchmarking method yielded different results on EC2 or something like that.

Re: Is Ruby Fast Yet?

#15
post #8

JRuby question -- Why is it that much slower? I'd have thought that part of the point was to take advantage of the JVM's built in optimization.

I'd wager that a bigger goal is being able to take part of the Java ecosystem.

That said, we really need to know which flags he's running Jruby with - and which

The internet tells me that you achieve better performance with -server at the expense of a bigger start-up time penalty. Anecdotally, it takes a while for the JIT compiler to find the hotspots in your code and optimize them away.

All of this will depend on how Jruby-rails keeps code in memory, yadda yadda. Someone who actually has used Java/Jruby recently can chime in with more details.

Re: Is Ruby Fast Yet?

#16
Without knowing what runtimes and parameters are used it's really hard to tell what's going on in this benchmark; JRuby can see 100% and sometimes more improvement on many workloads by tweaking JVM options.

It looks like JRuby is just run under the system JRE (which is what?) with no additional options; that's going to be slow for most workloads.

It'd be nice to see a lot more documentation around the runtime configurations and what the Rails app itself is doing.

Re: Is Ruby Fast Yet?

#17
> The benchmark premptively runs the fans and pauses between runs in order to cool off. These measures give JRuby at least a 25% speed gain. However, JRuby still might be running slower than it would on a box with appropriate cooling.

Right. Your computer can't be trusted to not throttle its performance due to crap cooling, and you're trying to benchmark using it?

Re: Is Ruby Fast Yet?

#18
post #3

Not sure how comparing different versions of rails shows if its 'fast' yet. I'd think setting up some request target and seeing how far RoR is from that target with each version would be better. Or comparing RoR to other platforms is also a good bet, eg http://www.techempower.com/benchmarks/ I just don't really see how this answers the question other than 'ehh I think it looks a bit faster than it was awhile ago?' ED…

>EDIT: Also interestingly, JRuby seems to be slightly better on the small instance EC2 test at techempower than regular Ruby (small instance should be similar to a laptop?). Yet in these graphs it's much slower. Anybody know the reason?

Thanks to some community experts, we're now using TorqBox (TorqueBox 3, built on Undertow [1]) for our JRuby tests. The JRuby community seems satisfied [2]. :)

[1] http://torquebox.org/news/2013/12/04/torquebox-next-generati...

[2] https://twitter.com/headius/status/413021218728443904

Re: Is Ruby Fast Yet?

#19

I'm surprised at how negative the comments are here. Graphing how different Ruby versions/implementations perform running Rails is very helpful! Glad to see that MRI continues to get faster with every version. Merry Christmas!

The negativity comes from the fact that this benchmark is useless and, at worst, misleading. True benchmarks are hard to get right. Running a bunch of stuff on a laptop isn't sufficient evidence of anything.

Kudos to making the benchmark opensource at least, but even from a quick peak, I wouldn't trust this at all. As others have mentioned, JRuby shouldn't be this slow. Odds are the benchmark is throwing away the JIT gains or the configuration is poor. Add that to the fact that there is no discussion of what a 'rails request' is or what version of Java is being used and there seems to be little to learn from this research.

Re: Is Ruby Fast Yet?

#20
post #13
post #9

Earlier quoted context omitted.

There's nothing magical about a Linux server. If you're arguing an LTS edition will run on newer hardware, well sure but the benchmarks will be just as incomparable.

You're right that theres nothing magical, but there is a clear advantage to faster disks, a more modern & faster CPU, newer & faster ram (this is running DDR2 in the benchmark), etc. I'd be curious why this particular machine was used for benchmarking, and if the same benchmarking method yielded different results on EC2 or something like that.

You should check out http://www.techempower.com/benchmarks/ where they test on hardware and in the cloud
Post reply on HN