DigitalDud wrote:
So there's a number of well-known performance issues with .NET. Reflection is slow. Throwing exceptions takes half a second. Cold starts take forever, the memory footprint is high. Half these performance bugs people just take for granted, "Oh yeah don't use reflection a lot, its pretty slow". But WHY is reflection slow? Why doesn't someone at MS open a bug against .NET, "Priority 1, fix NOW, millions of customers experiencing millions of dollars lost in operating costs cause of a slow reflection code, blah blah"
Well with the things you mentioned it's likely not to be performance issues. Its simply design issues. And as you wrote these have been VERY well documented and are widely known. If you have Exceptions in your normal execution path its simply plain wrong.
Moreover as these were design choices they are
a) likely to not be correctable without changing the design
b) speeding them up would not help anybody, because nobody uses these constructs in performance-critical code anyways.
DigitalDud wrote:
Environments like .NET are supposedly awesome because if you make performance improvements to the runtime, the JIT compiler, etc., every single program that targets .NET receives a performance benefit. And today that is A LOT of programs. But the thing is, they DON'T update the runtime. They haven't touched it in years, and 2.0 didn't do much for performance anyway. And it's not like you can't make runtime changes without breaking compatibility. You don't have to touch the libraries, just make the compiler faster.
I'm here with you for this one (mostly). Obviously not the compiler, but the JIT-results, but I guess thats what you meant anyways.
E.g. why do NGEN compiled programs usually still perform worse that the same application compiled with an optimizing c++ compiler?
With the additionaly system information that NGEN has (Exact processor type, available RAM, ...). It should always be able to outperform or at least be on line with precompilers.
And the JIT still isn't able to take advantage from its special execution semantics to dynamically optimize applications (e.g. like HotSpot).