CODE Presents: Improving String Handling Performance in C#

Presenter: Joydip Kanjilal

This is an online event.

Click here to register for this event!

A string is an immutable type, which means that once you have created a string object, you cannot change it in any way. When you change or modify a string object, a new instance is created. There are several ways to overcome this performance issue. This session talks about how strings are represented in the CLR memory, the performance challenges you would often encounter when working with strings and how to fix them in C#.

The following points are covered:

  1. Understanding the CLR

    1. How are strings represented in memory?
    2. Introduction to strings in C#
    3. Strings in C#: The performance pitfalls
  2. Improving string handling performance

    1. Fast string allocations
    2. String interning
    3. Using StringBuilders
    4. Reducing allocations
      1. String.Create
      2. Span
      3. Memory
  3. Benchmarking performance using BenchmarkDotNet

  4. Conclusion

At a Glance:

Presenter: Joydip Kanjilal

When: Wednesday, August 31, 2022 (1 day)
Price: Free!

Venue Information