site image
Andrew Lock avatar

Andrew Lock

Performance
  1. Loading...
  2. Sponsored by Dometrain Courses—Get 30% off Dometrain Pro with code ANDREW30 and access the best courses for .NET Developers

    30% off with code ANDREW30 on Dometrain Pro
  3. ASP.NET Core in Action, Third Edition

    My new book ASP.NET Core in Action, Third Edition is available now! It supports .NET 7.0, and is available as an eBook or paperback.

  4. Banner image for Reducing allocations by caching with StringBuilderCache

    Reducing allocations by caching with StringBuilderCache

    A deep dive on StringBuilder - Part 5

    In this post I look at the internal StringBuilderCache type, benchmark it against a StringBuilder, and walk through the code to show how it works.…

  5. Banner image for Inserting and removing characters

    Inserting and removing characters

    A deep dive on StringBuilder - Part 4

    In this post we look at the Insert() and Remove() functions, which can involve tricky manipulations of chunks in the middle of the linked list…

  6. Banner image for Converting chunks to a string with ToString()

    Converting chunks to a string with ToString()

    A deep dive on StringBuilder - Part 3

    In this post I look at StringBuilder.ToString(), show how multiple chunk arrays are converted to a string, and compare it to .NET Framework's approach.…

  7. Banner image for Appending strings, built-in types, and lists

    Appending strings, built-in types, and lists

    A deep dive on StringBuilder - Part 2

    In this post I look at how StringBuilder appends strings, ints, and doubles efficiently. We also look at how it adds lists with a separator.…

  8. Banner image for The overall design and a first look at the internals

    The overall design and a first look at the internals

    A deep dive on StringBuilder - Part 1

    In this post I take an initial look at the StringBuilder type, show how it's designed, and dive into the source code to see how it works…

  9. Banner image for A deep dive on StringBuilder

    A deep dive on StringBuilder

    In this series I look at the source code behind StringBuilder, show how it is used to reduce allocations, and dig into some internal optimisations…

Andrew Lock | .Net Escapades
Want an email when
there's new posts?