3 ms·
The tighter the loop of whatever you're doing, and the more consistently it is run over time, the slower your application will be, just generally speaking. This
by antics 15y ago
The tighter the loop of whatever you're doing, and the more consistently it is run over time, the slower your application will be, just generally speaking. This is because the miniscule differences between individual operations add up asymptotically to make a difference. If it's a matter of, say, performing a square root exactly once, you will not notice a difference. If, on the other hand, you are running a search algorithm over a lot of text, you may (probably will?) see significant slowdown.
Good news is, you can make (e.g.) a C-hook, that lets you write you app in Ruby, and your "search" code in C (or something like that). I don't know what you're doing specifically, so that may be an answer. I will say that if you're interfacing heavily with the database in this search, it is very likely that Rails is not the answer -- Rails tries to handle DB work transparently to the user, and going against that problem is not just hard, but also REALLY labor intensive. I'm told this is why twitter dropped Rails.
As far as speed goes, Ruby is about as fast as PHP at this point, although rails runs a bit slower.
Hope that helps! Feel free to ask follow-up questions.