Which will perform better a PHP/MySQL photo gallery or ASP.NET/C# photo gallery?
Imagine that we have PHP/MySQL photo gallery on Linux VPS with 4 GB Ram and 2 CPUs. On the other side we have ASP.NET/C#/SQL Server photo gallery with Windows 2008 VPS and 2 GB Ram and 2 CPUs.
Assuming they have been coded by the same programmer to perform 开发者_开发知识库the same functionality. Which will perform better in this case taking into acount that Ram differences?
Well, generally speaking the speed of the language isn't going to matter much on a web gallery, the thing that is going to take the longest is actually sending the pictures to the client.
But to actually answer your question, ASP.NET will probably run faster, simply because it compiles its code, and unless you are using a PHP accelerator (caching), ASP.NET will probably be faster.
Well, unless you are getting hundreds of requests, or are handling thousands of pictures, the RAM probably won't factor too much into it.
精彩评论