I've made a simple hello world project in asp.net mvc2,3 aspx and 3 razor and benchmarked them. What I see is:
asp.net mvc 2 aspx : 4200 request per second
asp.net mvc 3 aspx : 3200 request per second
asp.net mvc 3 razor : 1700 request per second
What's wrong with razor, it's so slow?
Update: I've redone the test. All 4 test virtual directories uses the same .net 4 integrated mode app pool. All projects are done with add new empty x project and adding 1 page with 1 line text and with no code. all sites are compiled in release mode. My system is windows 7, 4 gb i7 4 cores. I've run the test 2 times to warm up iis and these are second run results. apache bench parameters : ab -n100000 -c1000 results:
asp.net 4 - rps: 4780 cpu: %43
mcv 2 - rps: 4322 cpu: %58
mvc 3 beta 1 aspx - rps: 2324 cpu: %54
mvc 3 beta 1 razor - rps: 1615 cpu: %54
Update 2 Scott Guthrie answered in his blog:
We haven't fully optimized MVC3 yet (there is usually a lot of cache tuning we do). We expect razor to be the same performance as the .aspx view engine before it is finally released.