Live data from Hacker News

Is Ruby Fast Yet?

isrubyfastyet.com

61–70 of 95 posts

Re: Is Ruby Fast Yet?

#62
I don't like those charts at all. I want to see the progressive Ruby versions on the X axis, I think. The dates are pretty meaningless. If it's the same code, it should run in the same number of cycles; anything else is just noise.

That said, +1 for having a go at it!

Also, yes, Ruby is pretty slow. But it's fast for getting something up and running quickly. If you get wildly successful, you can always swap it out for something else if you need to.

Re: Is Ruby Fast Yet?

#63
post #46
post #23

Earlier quoted context omitted.

A lot of optimizations are off by default, or completely unavailable because he's using JDK 1.6. See https://github.com/jruby/jruby/wiki/PerformanceTuning Startup time is slow because it needs to warm up the JIT. Same with Rubinius, which is mysteriously missing from most of these graphs. Memory consumption partially depends on how much you tell the JVM to use - it'll run the garbage collector more or less aggressive…

> Startup time is slow because it needs to warm up the JIT. Question (I'll end up simultaneously googling...): if the code doesn't change between restarts, is there a way one can preserve JIT statistics, so the JVM doesn't have to rediscover hotspots? Like an RDBMS able to load custom statistics for its plan engine.

This is a planned feature for Java 9.

Re: Is Ruby Fast Yet?

#64
post #49
post #35

[serious] I'm building http://techendo.co/ and it's running rails on heroku. I was wondering if there was some easy ways to get some better performance out of it immediately now that we're picking up traffic. If anyone could give me some pointers or link me to a page I'd appreciate it.

That's an incredibly broad question, so it's pretty hard to answer. Here's some general ones: * More instances will give you more requests/second, but only so long as secondary system (database, search server, whatever) can keep up with the load * N+1 queries will kill your performance. They can add a lot of time to processing requests. * Everything in the most used parts of your site should hit an index on the datab…

Tools like https://github.com/MiniProfiler/rack-mini-profiler really help with the N+1, and general insight into how long database calls usually take.

Relevant RailsCast: http://railscasts.com/episodes/368-miniprofiler?view=asciica...

Re: Is Ruby Fast Yet?

#65

Earlier quoted context omitted.

Depending on how you are deploying the ruby app. As far as I know, Passenger Enterprise and Puma are the only multi-platform ruby rack app servers that support multi-threaded concurrent request dispatch. There may be other jruby/java-only deployment scenarios that support concurrent request dispatch. Without concurrent request dispatch, jruby's hypothetical greater thread parallelism is unlikely to effect requests-pe…

> Without concurrent request dispatch, jruby's hypothetical greater thread parallelism is unlikely to effect requests-per-second benchmarks. Also, the benchmarking test would have to be willing to issue requests concurrently! That's a good point. That said, JRuby would most likely benefit from a concurrent test, as the thread-per-request model of JRuby can scale much higher than the process-per-request model which is…

Yes, that's what I said, _if_ you have an app server that supports concurrent request handling. If you are deploying a JRuby app with thin or unicorn or the free version of passenger -- you don't get multi-threaded concurrent request handling.

Re: Is Ruby Fast Yet?

#68
post #57

Earlier quoted context omitted.

It is when your development process involves rapidly iterating the code by running the process many times (i.e. TDD). Anecdotally, when the feedback loop is tighter, I'm much happier. Developing (especially refactoring) in Rails feels like watching paint dry, since it's soooooo slooooow. Every time the process needs to restart, I'm left hanging........waiting......for..............the.............. ..........process.…

Oh god. Please edit your comment so it doesn't break the whole layout.

No can do. It got downvoted and HN does not allow me to edit negative karma posts. So please upvote my previous post so I can fix the layout of these comments :-)

I'm assuming the negative votes are due to the formatting and not the message. I hope you, dear reader, don't miss the irony of this situation...

If it's downvotes because of the message, well I feel bad for the downvoters and wish them much luck with using their framework.

Re: Is Ruby Fast Yet?

#69
post #24
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.

My question as well. Every perf benchmark I've seen of jruby over the years, it's much faster than MRI (given time to boot & JIT anyway). I think this guy's numbers are very suspect.

I was about to say the same thing... I thought JRuby was king for long running Ruby apps (like a Rails app) for many years now... seems very suspect.

Re: Is Ruby Fast Yet?

#70
post #57

Earlier quoted context omitted.

Oh god. Please edit your comment so it doesn't break the whole layout.

No can do. It got downvoted and HN does not allow me to edit negative karma posts. So please upvote my previous post so I can fix the layout of these comments :-) I'm assuming the negative votes are due to the formatting and not the message. I hope you, dear reader, don't miss the irony of this situation... If it's downvotes because of the message, well I feel bad for the downvoters and wish them much luck with using…

You missed the edit window. If you don't come back and edit your post within one hour, it's locked. Negative karma has nothing to do with it. That's the risk of fire-and-forget posting.
Post reply on HN