Is the execution time (run-time) performance of code in a class that is loaded via reflection identical to the same code when the class is created using the new keyword?
I say yes. But I was discussing this with a colleague who believes that the reflection oriented code is always slower.
My view is that regardless of how the class was originally loaded/created, the performance will be identical because the JIT compiler does not care how a class was loaded.
Am I correct? Either way, I'd appreciate any references that can help clarify this.
(NB: I'm not talking about the performance of creating a class using reflection versus the new keyword. I'm referring to the actual code in methods of the class after it has been created.)