Daniel Lawson ๐Ÿ‡น๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ซ๐Ÿ‡ฒ๐Ÿ‡ซ Profile picture
Software Developer. I Share tips about C# and AWS | 3x @awscloud Certified | Christianโ›ช๏ธโœ๏ธ | Husband & Dad AC Milan ๐Ÿ”ดโšซ Azzuro ๐Ÿ‡ฎ๐Ÿ‡น โšฝ๏ธ I Tweet in ๐Ÿ‡ซ๐Ÿ‡ท & ๐Ÿ‡ฌ๐Ÿ‡ง
Mar 17, 2022 โ€ข 13 tweets โ€ข 4 min read
C# performance and memory optimization ๐Ÿ’ก
For a very long time, I used to compare strings in my codebase by doing stringA.ToLower() == stringB.ToLower(). I did not know that I was consuming a lot of memory. A thread ๐Ÿงตโฌ‡๏ธ
#csharp #dotnet Even if computers are very powerful nowadays, it's recommended to build memory-efficient systems because low memory allocation increases performance of the system. So it's always a good idea to use less memory when possible.