I hear what you are saying about exceptions, but you also have to live in reality. Look at danielparks benchmarks in this thread; rails3 under 1.9.2 is faster than rails2 under 1.8.7.
Its easy enough to spout platitudes like "don't use exceptions for flow control", except remember two basic facts about the commit that I linked:
1. It was using exceptions for flow control as an optimization
2. That optimization was indeed faster on 1.9.2
On top of that, when the rails team was notified about how bad this "optimization" was in 1.8.7, they immediately fixed it.
I just don't see how any of this fits into "don't give a shit about performance".
Obviously, I didn't form my opinion on that attitude based on this particular issue. But maybe you're right and the Rails leopard has actually changed its spots. Apart from that, it's unclear whether the slowdown in NGIN is caused by this one line of code alone.
To be clear, I don't think that the NGIN slowdown is caused by this exception stuff, because that has been taken out and was really a different performance problem altogether. I only raised it because it was similar -- a problem only on 1.8.7 that was fixed as soon as someone mentioned it.
I think it is very interesting that the specific test produced in the original post is actually faster under Rails 3 and Ruby 1.9.2 than it is under Rails 2 and 1.8.7.
My only grief with you, fauigerzigerk, is that you claim the Rails team doesn't "give a shit about performance", when the performance problems seem to be related to people using an older version of Ruby. I think you are making an extraordinary claim -- that the rails team doesn't "give a shit", in in fact, they clear do give a shit.
I'm sure there are some individuals who do care. But the design of Rails and similar frameworks is consistent with what the benchmarks show. They have to be dog slow and they are. I want to assume that this is out of choice, not out of incompetence, hence my conclusion that they don't give a shit. I'm astonished (and actually pleased) to meet so much resistence. Most of the time I just get to hear something about how speed doesn't matter.
Its easy enough to spout platitudes like "don't use exceptions for flow control", except remember two basic facts about the commit that I linked:
1. It was using exceptions for flow control as an optimization 2. That optimization was indeed faster on 1.9.2
On top of that, when the rails team was notified about how bad this "optimization" was in 1.8.7, they immediately fixed it.
I just don't see how any of this fits into "don't give a shit about performance".