Hacker News new | ask | show | jobs
by pmelendez 4831 days ago
I don't know about that.

Maybe is fine if you have a controlled traffic, but with better speed you can manage more traffic with the same hardware. That's why Facebook had to build a PHP compiler at some point.

2 comments

For probably almost every website/webapp in the world, the amount of servers you have is 1. Facebook is not a typical application.

Besides, code is written for more than just websites. Chef/puppet/cfengine, one-off scripts you write, etc. There's a whole lot of these types of things that don't matter if your code takes 0.01 seconds or 0.05 seconds.

"For probably almost every website/webapp in the world, the amount of servers you have is 1." Still if I can do the same thing in a cheaper server with the same level of productivity, why wouldn't I do that?

"There's a whole lot of these types of things that don't matter if your code takes 0.01 seconds or 0.05 seconds." Yeah but why would you prefer Ruby instead of PHP/Python/Perl for those things then?

Because they prefer Ruby? I personally wouldn't choose PHP or Perl unless I had no other choice. Nothing wrong with other people choosing them, but they aren't for me. And given the choice between Python and Ruby, I'll choose Ruby unless there is a compelling reason not to. And saving a few hundred dollars on a commodity server would never be compelling enough for me.

Edit: And when I actually need better performance from a specific piece of code, I can and do drop down to C.

Most of your time is probably spent in I/O wait. For most applications, it's not that important to optimise the 5% waiting time as opposed to the 95% waiting time
That's not entirely true, for instance a ranking algorithm would use way more CPU that I/O (in most cases you load your data in memory anyway)

In any case, How you would justify using Ruby over another script language like Python, Perl, etc? All of them are comparable in terms of productivity and seems to be orders of magnitude faster.

The majority of applications don't do a lot of number crunching.

I'd recommend Ruby because it's readable, it has a good tool ecosystem a great community and design decisions that please me. Python and Perl are just not what I'd like to see in a language. I will use them if I have to, but given the chance I'll use Ruby.

>>The majority of applications don't do a lot of number crunching.<<

Exactly how do you know what the majority of applications do or don't do?