Description
HashSet<T> contains three calls to string.Format in non-invariant checking methods.
|
Logger.Log(string.Format(string.Format("Expand to {0} bits", bits + 1))); |
|
Logger.Log(string.Format(string.Format("Resize to {0} bits", bits))); |
|
Logger.Log(string.Format(string.Format("Resize to {0} bits done", bits))); |
Even though Logger.Log per default sends any string into void, this still results in some unnecessary string allocations.
Solution
I would suggest deleting those lines or hide them behind #if DEBUG
Describe alternatives you've considered
Additional context
Description
HashSet<T>contains three calls tostring.Formatin non-invariant checking methods.C5/C5/Hashing/HashSet.cs
Line 127 in 21e90a2
C5/C5/Hashing/HashSet.cs
Line 144 in 21e90a2
C5/C5/Hashing/HashSet.cs
Line 167 in 21e90a2
Even though
Logger.Logper default sends any string into void, this still results in some unnecessary string allocations.Solution
I would suggest deleting those lines or hide them behind
#if DEBUGDescribe alternatives you've considered
Additional context