开发者

Asp.net Vs Php Performance [closed]

开发者 https://www.devze.com 2023-01-24 19:51 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expe开发者_C百科ct answers to be supported by facts, references,or expertise, but this question will likely solic
As it currently stands, this question is not a good fit for our Q&A format. We expe开发者_C百科ct answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 12 years ago.

What is the Performance difference between php web site or asp.net application ? There have difference when running ? Who is more quickly ? I just want to hear your opinions or your arguments.

Thank you !


Both PHP and ASP.NET have countless optimization tools available to them which help you fine-tune the execution speed of your software based on what it actually does. There's a lot of mentions of ASP.NET being "heavier" than PHP, but this all follows a trend of Microsoft products going for scalability instead of speed at light server loads (and performance usually matters only when you start having heavy server loads anyway).

Any given piece of software may use some features best optimized on PHP or features best optimized on ASP.NET. Code quality is also essential: a good PHP programmer can write unoptimized code that is faster than optimized code by a bad ASP.NET programmer (and vice versa). To provide a general answer is impossible.

Besides, keep in mind that the server-side code is seldom the bottleneck (it's usually more of a database issue, unless you're doing exceptionally complex things in your code), and even if it is, performance issues can easily be solved by throwing more hardware at it (at which point the cost of that hardware becomes as important as the language being executed).

Either way, both solutions will be "fast enough" for the vast majority of your needs, and if you have specific needs that require exceptional performance properties, you will probably end up writing it in another language anyway, independently of your server language.


This is very hard to benchmark. The way ASP.NET applications work vs. the way PHP applications work are very different.

In my own personal experience, it has taken way more server power to support even basic ASP.NET applications vs. similar PHP applications. However, this largely depends on the application.

I almost exclusively use PHP, because of how lightweight it can be. But I'm sure others can fill you in on situations where ASP.NET will be much more efficient for the task.

Again... depends on the application.


Generally you should not be concerned with performance issues but instead choose the framework which offers the most benefits when it comes to development and licensing cost. Also, performance is relative. I have seen performance comparisons showing that these two are very close when it comes to performance, even though PHP has to build the whole stack on every request and ASP.net does not.

Consider this: If you have so much traffic to your site that you need to be concerned with performance, then you probably do not have a problem buying another server to cope with it - so perhaps you should choose the most scalable technology instead of the fastest one?

0

精彩评论

暂无评论...
验证码 换一张
取 消