lsoft / DpdtInject

Highly efficient compile-time general purpose DI container based on C# source generators.
https://www.nuget.org/packages/Dpdt.Injector/
MIT License
32 stars 3 forks source link

Slower source-to-IL compilation, slower JIT compilation. #62

Open ekalchev opened 8 months ago

ekalchev commented 8 months ago

I saw this mentioned as drawback

Slower source-to-IL compilation, slower JIT compilation.

Does JIT compilations times outweigh performance penalty of using reflection?

lsoft commented 8 months ago

@ekalchev Hello.

Does JIT compilations times outweigh performance penalty of using reflection?

No, it does not outweigh , of course. Reflection is completely out of scope because its horrible performance. I mentioned these drawbacks because only for considerations of completeness. (I did not estimate its weight, and suspect it is small)