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.