joelverhagen / NCsvPerf

A test bench for various .NET CSV parsing libraries
https://www.joelverhagen.com/blog/2020/12/fastest-net-csv-parsers
MIT License
69 stars 14 forks source link

add GetExpressionTree in ActivatorFactory #34

Closed leandromoh closed 3 years ago

joelverhagen commented 3 years ago

Interesting, does this demonstrate better perf than some of the other approach? Last time I checked IL emit was the fastest but had an extreme first time cost. Where does this approach fall in the startup perf vs. per-invocation perf?

Happy to merge it either way to demonstrate a variety of approaches.

leandromoh commented 3 years ago

Expression tree looks to be the fastest... at least on .net 5. See https://andrewlock.net/benchmarking-4-reflection-methods-for-calling-a-constructor-in-dotnet/

image