the performance debate

Is Ruby faster than PHP? Is Ruby on Rails faster than PHP on CakePHP? Is Ruby on Rails faster than PHP? Is Ruby faster than PHP on CakePHP?

I would almost guarantee that unless you are running the world (literally) with your application, it won't really matter which is faster or slower.

You should decide which is better or easier for your needs and base your decision on that, not on speed. Both PHP and Ruby ( and CakePHP and Rails for that matter) have their positives and negatives in several areas.

Without having an idea of what you kind of app you are building, there is NO WAY to know which is better, faster, stronger, easier, etc. for you. I can tell you this though...Rails will be much more ENJOYABLE, regardless of the app you are building.

Also, worry about speed, performance, and scaling when you have reason to worry about it.

--Cory

Interesting to see that Raistlin itself can't answer these simple questions :slight_smile:

Now, to the answers:

Is Ruby faster than PHP?

No.

Is Ruby on Rails faster than PHP on CakePHP?

No.

Is Ruby on Rails faster than PHP?

No.

Is Ruby faster than PHP on CakePHP?

No.

Easy, huh?

I think the more important questions to ask are:

Is Ruby easier and more enjoyable that PHP?

Yes

Is Ruby cleaner than PHP?

Yes

Is Ruby on Rails easier than CakePHP?

Yes

Does using Rails make you a better developer than using CakePHP?

I would say Yes.

Those are the important questions to be asking. Now, as far as speed. Depending on how the app is built, Ruby could certainly be faster than PHP and vice versa. All languages are slow if not built and configured correctly.

Once again, this is a debate that cannot be had on these generalizations alone, unless you are talking about the pure core attributes of both languages. Ruby easier to learn and much more enjoyable and cleaner to use than PHP, period.

--Cory

Based on what do you say that Ruby is easier and more enjoyable than PHP? On your own opinion? On your own experience?

Saying that X is "easier" to learn than Y is a highly subjective matter, maybe for you it's true, but it isn't for someone else.

His questions where pretty simple and the answer is even simpler, PHP is faster than Ruby, that's is a fact and any benchmark can make you reach the same answer without any subjectivity.

And i can definitely smell prejudice in this question, "Does using Rails make you a better developer than using CakePHP?". Ruby/Rails developers are no better than any other developers in any other language, you will always find crappy code, be it in Ruby, Java, PHP, if the developer is an idiot, he'll write ugly code using any tool he can get a hold.

Let us not spread this "my d*ck is bigger than yours" idea any longer.

Is Ruby Faster to Develop than PHP? Yes (What 5 people did in a year, I did in a week)

Can I make my Rails App Faster than the "old" PHP APP? Yes

Is Ruby the bottleneck? No

Can I learn new things in ruby fast? Yes

Can I get them into Production fast? Yes

Can I scale applications to support billion dollar Multi-national companies? Yes

I know a dozen languges(Of the computer type), a kernel hacker, device driver writer, and a embedded systems developer. I can make ruby stand up and shout, and I can do it with a hour a day.

After having 5 man years into a PHP project, we scrapped it, and I recoded it in rails in no time at all, by myself.

Is Ruby Faster to Develop than PHP?

Yes (What 5 people did in a year, I did in a week)

Crappy developers, what a shame :slight_smile:

Can I make my Rails App Faster than the “old” PHP APP?

Yes

Is Ruby the bottleneck?

No

Can I learn new things in ruby fast?

Yes

Can I get them into Production fast?

Yes

Can I scale applications to support billion dollar Multi-national

companies?

Yes

I know a dozen languges(Of the computer type), a kernel hacker, device

driver writer,

and a embedded systems developer. I can make ruby stand up and shout,

and I can do it

with a hour a day.

After having 5 man years into a PHP project, we scrapped it, and I

recoded it in rails

in no time at all, by myself.

Maybe you should try to learn a litlte bit more of PHP and worry less about kernel hacking or device drivers.

Well the had excellent references. And I've look at it. But by software engineering standands php is spagetting code.

Ruby is modular, and for once the object oriented nature works quite well. ActiveRecord works well as well. Show me php applications that can handle 400 different tables, that can be developed by one guy in two weeks?

I've seen a few php developers that were ok, but its not something I'd recommend a fortune 500 use to do a proper application.

Well the had excellent references. And I've look at it. But by software engineering standands php is spagetting code.

By what software engineering standards? Yours?

Ruby is modular, and for once the object oriented nature works quite well.

Oh, so PHP isn't modular? Do you know that PHP has classes and interfaces? And that they do behave almost like Ruby classes and Modules?

ActiveRecord works well as well. Show me php applications that can handle 400 different tables, that can be developed by one guy in two weeks?

What would keep a PHP application from handling 400 or 400.000 tables?

I've never seen a PHP database driver saying that it had a maximum of tables they could handle, maybe you can point me out to this.

And about being developed by one guy, i can't see the problem also. A good developer is good in any language he masters.

I've seen a few php developers that were ok, but its not something I'd recommend a fortune 500 use to do a proper application.

Maybe you should know that Yahoo runs in PHP, Wikipedia runs in PHP, many of the biggest websites around use PHP.

Crappy developers write crappy code, no matter what tool they use. I've seen some Ruby code that scared me to death, but the language isn't to blame, the blame lies on the people that use it.

Okay, where's the link to mark a thread a [SPAM]?

Man I hate these pointless discussions. Why do I even read them? It's like crack or something I just can't help myself.

Yeah, this whole debate is getting pretty pointless now. Just use whatever you want to use and move on, cause at the end of the day, this is a Ruby on Rails group. You can hype PHP all you want Mauricio, but I will take Ruby over PHP any day. You may feel differently.

--Cory

Ruby in general is one of the easiest languages to code in that I've ever seen. It also makes it easy to use lambdas in a much more natural fashion than I've seen before.

Rails is the simplest and easiest framework I've seen for building web applications.

No one chooses Ruby (or Rails) because it's fast (that would be silly, since it's not), we choose it because it helps us be more productive, and spending more on server power to run slow code is cheaper than spending more on developer time. If you can find, hire and retain a group of coders who can work efficiently and elegantly writing website in C++, that would be a pretty fast website. I wouldn't try it, though.