#474 Improve memory allocation by initializing collection size

Sometimes just a minor change can affect performance

Improve memory allocation by initializing collection size

Sometimes just a minor change can affect performance. Here’s a simple trick: initialize your collections by specifying the initial size.

eBook: Planning a Blazor Application (sponsor)

Dive into how to modernize successfully your application with Blazor or plan your next Blazor application.

A unit of profiling makes the allocations go away

Visual Studio team has updated unit test profiling, enabling you to utilize any of the available tools in the performance profiler – not limited to the instrumentation tool alone. With this modification, it becomes effortless to profile small units of work in isolation, implement modifications, and subsequently reevaluate and verify the effects of the change.

Don’t persist GetHashCode()

If you're trying to create a key/value lookup, do not use GetHashCode as it is not deterministic or stable. Instead, use a stable key that you own and can safely persist across application domains.

Debugging Enhancements in .NET 8

.NET 8 introduces debugging enhancements to many commonly used types. Check out what is new and discover how .NET debugging is better than ever.

The convenience of .NET

The .NET platform provides convenient solutions to many tasks, for developers looking for a straightforward utility function or a high degree of control crafting an algorithm.

newsletters

Would you like to become a sponsor and advertise in one of the issues? Check out our media kit and get in touch.