Posted by Fred Wu
Disclaimer: This is a very simple, ‘Hello World’ benchmark which has no impact to any real world applications. A more thorough benchmark test (by building two real world applications) is planned. :)
Disclaimer 2:I apologise for posting such a useless benchmark (I certainly didn’t expect it to hit the DZone front page), but I think most of you missed the point. I merely posted this as a result of surprise (to me anyway). At a later stage I will conduct a much more meaningful comparison between some of the frameworks. Until then, please ignore this post. :)
Last few days I have been playing with Ruby and Rails, again.
Today, when someone was asking on a forum about the efficiency of web frameworks, I thought I’d give the few frameworks I work with some more benchmark testing.
So I went ahead and benchmarked CodeIgniter, Kohana and Rails, using a simple ‘Hello World!’ page. Now before I post any benchmark results, you should know that I have previously done a benchmark test on CodeIgniter, Kohana and CakePHP. CodeIgniter and Kohana shared similar results.
mod_rails leaks memory like never seen before.
Talk about unscientific benchmark? You provide nothing, and I say nothing about computer configuration, memory use, settings, framework configuration, etc.
@Richard: mod_rails is still in its early stage so I wouldn’t worry about it too much. :)
@Fredrik: Yes it is unscientific and I am aware of it. I merely provided the results for reference only, just as I did with the previous benchmark.
This says nothing about theone glaring problem with rails. Crashes. Many of them. PHP has far fewer of them.
What was the benchmark app doing? Hello World or something more? Also, CodeIgniter’s ‘efficient’? Not sure about that – perhaps relative to some other big name frameworks which are wholly unoptimized for performance it is. Is that what you meant? Thanks.
Unfortunately, similar to most of the benchmarks out there, it was only a simple Hello World test. I posted these results because I was surprised at the performance of Rails. I always assumed that CodeIgniter or other lightweight frameworks would perform faster. I am planning to do some more thorough benchmarking though, perhaps to build a real world application in two branches, one with CodeIgniter or Kohana, one with Rails. I am sure that will satisfy many of you. :)
Benchmarking hello world is not very useful for 2 reasons:
– You’re not using any of the real world features of any of these
frameworks, so you’re basically just benchmarking the default
include overhead.
– Most frameworks are targeted at reducing development time, not
improving performance.
CodeIgniter is better. It runs very fast, you don’t have to use an ORM or even a full model if you don’t want to. It’s not preloaded with every upgrade that you don’t need. It’s easy as hell to upgrade and add extensions. In fact you just drop in a file and call it like any other library class. CODEIGNITER RUNS MEGA FASTER THAN RAILS AND DOESN’T REQUIRE EXPENSIVE HOSTING.
For people who don’t like PHP because of the ugly syntax, hows this:
$something equals $somethingelse
no echo statement, no nothing. Just as easy as that.
OK, it didn’t let me post my PHP code lol let’s try this again.
——————————————————————————
For people who don’t like PHP because of the ugly syntax, hows this:
>?php if($something == $somethingelse): ?<
$something equals $somethingelse>/p<
>?php endif ?<
no echo statement, no nothing. Just as easy as that.
LOL, you get it.
this is a great benchmark, thnks
Can you try benchmarking DooPHP with Rails? I found it on Dzone, another lightweight PHP framework which seems to be a lot faster than codegintor. I think Rails would be quite bloated??