whats the performance comparison of phalcon vs asp.net mvc

Hi guys,

As we always looking for the best technology & performance on the busy loaded servers. I have seen the results & charts of comparison between phalcon vs other php frameworks which was quite impressive but how about asp.net mvc & phalcon do anyone have an idea regarding performance about these two technologies.This question will help not just me but all others who are looking for this comparison.

Thanx in advance

I've never worked with asp.net, but if it works in a similar way to PHP:

  1. Write PHP code
  2. When file is requested, compile PHP code to machine code
  3. Run machine code
  4. Send output to browser

then Phalcon is almost certainly faster. Step 2 is what takes a lot of time, and having Phalcon already be compiled speeds up stuff quite a bit.

A couple of answers: ASP.NET MVC should be faster.

Why: Regular PHP is interpreted and as such is the slowest around. .NET is a JIT environment like Java the performance of .NET is within 5% of C / C++ or it is said to be. Microsoft is investing heavily to get the performance of .NET as good as possible.

Some benchmarks: http://www.codeproject.com/Articles/212856/Head-to-head-benchmark-Csharp-vs-NET

But: Benchmarking anything meaningfull is hard.

So way to long answer: Please keep in mind the PHP framework speed is interesting but if you look at something that actually hits the database then your performance will tank hard. So things like caching and serving static pages is usually the way to go for really high performance. This can very easily be done in all sorts of ways.

This is a link that i found on the performance of PHP on Apache vs IIS with a drupal install with a site codebase: https://groups.drupal.org/node/234373

There is also a project called Phalanger which is a way to get PHP code to run on the .NET Framework. It's not 100% feature complete with the latest PHP versions: http://www.php-compiler.net/blog/2014/phalanger-4-0#more-969

An example of benchmarks with wordpress on Phalanger http://www.codeproject.com/Articles/396035/Improved-WordPress-performance-with-Phalanger

This is comparable with Facebooks Hip Hop VM, which is also running a sort of PHP compiler in a VM

What does all this tell you about the performance, not really a whole lot because there is also things like databases and database drivers to be taken into account and loads of other goodies :) And ofcourse the way this framework does it's thing it's not really php but a php extension.

Which should make up for a bunch of inefficiencies.

edited Jun '15

Maybe worth mentioning that the overheards that come with Windows servers negate any speed improvement that might have be gainned by .NET JIT.

PHP on a decent *nix server does scale better, ... increasingly more so using Phalcon ,.. and even more so using PHP as JIT like HHVM.

@Franck: I love opionions like that without any benchmarks or facts to back it up. Feel free to back up what you say with facts / sources etc.

edited Jun '15

Benchmarks out of context are hardly meaningful. The specific of your use case would dictate your requirements and what you should benchmark against...

The conventional wisdom is that Unix outperforms Windows, that JIT is faster than interpreted, etc… Period.

Your links/benchmarks are not really relevant to the OP e.g. comparing Window’s Apache vs IIS is irrelevant, etc...