Dapper
Dapper copied to clipboard
performance: skip `ToString` with interpolated string
Interpolated string skips the Guid.ToString allocation by calling ISpanFormattable.TryFormat
Yep, I'm very familiar with the joys of interpolated string internals (I was very recently proposing changes to /runtime in that area)
I wish the compiler were smart enough to do this by default for common types. I've done this exact same change so many times 😞
OOC how much focus does Dapper place on performance? Looking through the repository I can definitely see a couple of changes to remove redundant strings ie Database.Async. IIRC there were some places where ValueListBuilder could be used, I doubt it would be a massive boost tho.