Why is (mono) asp.net slower than php?
I have a simple hello world written in asp.net, php and regular html. They are being served by nginx using fastcgi for php5 and xsp (mono 2.6.7, fastcgi-mono-server2.exe 2.6.5.0). I am using a simple .NET script to make async web request. What i found was in the span of 1000ms
- php: 250-400
- asp: 120-140
- html: 6开发者_开发百科00-900
- 8k png: 250-300
With a simple hello world app php is consistently 2-3x faster. Why is this? i always thought asp.net would be faster (and php startup would be slow). But it appears per request asp is significantly slower. Now i understand i am not actually comparing execution speed since its hello word and not complex code.
What is the difference between the two backends to make this significant difference?
Here is the code i use to test the request.
Because fastcgi is not well implemented. I am using mono xsp web server, its recommended to use as dev server only but it works pretty good in production Here is Article about performance tests Its in Russian but scroll down there is a table where you can take some information
精彩评论