Closed JimBobSquarePants closed 8 years ago
@JimBobSquarePants Whoah! :grinning::100:
I've just got back from a holiday, I'll review & merge in asap :+1:
Excellent! I'd like to see if I can squeeze a little more perf (test Concurrent dictionary vs HashTable etc) but I don't think we can get more out of the accessors themselves without using something like FastMember or rolling our own IL code which is hard work.
Tried taking a look at it this evening, but hit this issue with BenchmarkDotNet dependencies:
https://github.com/PerfDotNet/BenchmarkDotNet/issues/132
My laptop only has VS2015 installed, so no MSBuild 12 on there (yet). I'll take a look at finding a happy medium, (or I'll install MSBuild 12 :wink:)
Quick update: I opted to install MSBuild 12, as I'm an edge-case (e.g. building against .NET 4.5 with only VS2015 tooling). If in future we decide to go .NET 4.6.x, then we can revisit the required tooling.
I'll update the installation/set-up docs in this branch (with download links for MSBuild 12).
I'm happy to merge this in! :smiley: Great job @JimBobSquarePants!
@mattbrailsford Did you want to review or feedback before we merge?
If you are happy, I'm happy 😀
Add compiled cached PropertyInfo accessors and benchmarking code.
This more than doubles the speed on my machine. Hopefully it should do the same on everyone else's. I'd love to see if somehow we could use the performance of dynamic but as far as I'm aware there's no way to get or set the properties without knowing the name at compile time.
:horse_racing: :horse_racing: :horse_racing: :horse_racing: :horse_racing: :horse_racing: :horse_racing: :horse_racing: :horse_racing: :horse_racing: :horse_racing: :horse_racing: