Discover and read the best of Twitter Threads about #dotnetlovesme

Most recents (1)

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.
Recently, I've tried to measure two ways of comparing strings:
1โƒฃ My old way of doing (see the first tweet of the thread)
2โƒฃ the use of string[.]Compare method.
Read 13 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!