We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Asp .NET Core vs Phalcon performance

Hi there,

Just curious if anyone knows or even has checked for a performance comparison on ASP.NET Core vs Phalcon. I've been trying to check but the only thing that comes up is a vs ASP.NET Framework comparisons.

Other then that I'm looking on relevant facts on why one could/should be faster and also other important considerations. It would be cool to have an updated discussion on this!

Best!

Phalcon is still working on php. It won't be faster than php itself. All your controllers, models etc are still in php, need to be inerpretated etc. Opcache can improve it by not so much as having compiled and native(?) code from ASP .NET Core.

So in short answet - asp.net core will be faster than php, so faster than phalcon. If you can't find any asp.net core vs phalcon then just look for c# vs php.

Also here is a link - https://www.techempower.com/benchmarks/previews/round13/#section=data-r13&hw=azu&test=json&l=6nq8e5

edited Oct '16

What are your concerns? Or you are just being curious.

@Jurigag: while pure C# might be faster in it's native/machine form, .NET is a framework. So it's hard to tell what is exactly faster. Some would say that PHP 7 is fast almost as native C. And OPcache can make a difference too.

I think the conclusion would be here - if one wants to use PHP as a middleware, Phalcon is the best choice unless you go a for a raw PHP (but you lose a lot of benefits). Usually devs expirienced with static programming languages such as C# and .NET framework will not even look at PHP in general. It's dynamic form just makes them go crazy.



1.9k

Since phalcon is a C extension, the bottleneck of most frameworks is greately reduced which allows it to be faster. I'm just curious on the speed of phalcon vs C# since I was amazed on how fast .NET core is and introducing a subject like this can help people decide on what to choose regarding performance.

Every app I had a chance to work with, written in .NET was slow as hell. OK, there's a database layer also (MSSQL) which makes it slower, but in general, .NET is not a champion of speed. Java was advertised as a queen-of-all-speeds, but, as it turned out in most cases that does not stand true or it does with 128GB of RAM and 20+ CPU cores with every level of caching possible.

Like we all said - Phalcon is the best choice in terms of performance if you're using PHP as your middleware. And not only performance, that's very important thing to note, with Phalcon you get a great toolset out of the box too.

IMHO it is also important to note how you set your environment. App server (PHP-FPM) needs to be separated from a web server (nginx). So regular Apache + mod_php is far from the best option to scale.

If you need raw speed, go for ANSI C then. Nothing can beat that.

edited Oct '16

It really, really depends on what type of application you are building. Saying "Every app I had a chance to work with, written in .NET was slow as hell" is a bit underinformed given that .NET Core (the framework in question) is a new framework written from scratch that is magnitudes faster than ASP.NET and performs strongly against NodeJS or Jsp for that matter. (see links)

https://www.socalcto.com/2016/07/techempower-benchmarks-and-microsoft.html

That aside, PHP's strong point is string manipulation, so if you need to do plenty of that, PHP will perform quite well. If you are doing lots of data manipulations, calculations, transformations, etc... Compiled languages like C# will generally perform much faster.

I said there was always companion - MSSQL. And yes, it was both ASP.NET and 'new' .NET. And it depends how the person or a team in charge of the app did entire job. Usually those folks work with 'black box' component and generally have very small inner computing literacy, so optimization was never a topic for them.

I agree that it really depends on the team that develops with the framework. But MSSQL is not an "always companion", you can use mySQL, PostgreSQL, MongoDB, DocumentDB and whatever else you desire with ASP.NET

edited Oct '16

Sure you can. But in reality those teams strictly rely only on Micro$oft products. They tend to believe they have 'better support' then etc.