Is C# slower than C++? That’s a pretty big question. As a junior developer, I was sure that the answer is “Yes, definitely”. Now that I’m more experienced, I know that this question is not obvious and even quite complicated.
Lock contention is a state where one thread is waiting for another while trying to acquire a lock. Whatever time spent waiting for the lock is “lost” time that is wasted doing nothing and causes performance problems. In this article, you’ll see how to detect lock contention problems, debug them, and find the core cause of the issue.
Some of the biggest performance problems in almost any .NET application boil down to string operations. They are both very common and by nature pretty expensive. In fact, looking at an average .NET Dump you’ll find that most of the memory is usually taken by strings (I heard about 70%). As you probably know, strings …