Improve memory allocation by initializing collection size
#474 – October 02, 2023 | View in browser |
C# Digest
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.
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 .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.
how did you like this issue?
newsletters

Older messages
Feature Flags 101: A Guide for .NET Developers
Sunday, September 24, 2023
They enable you to experiment with new features, perform gradual rollouts, and revert changes quickly if needed. #473 – September 25, 2023 View in browser C# Digest Feature Flags 101: A Guide for .NET
What's New in First Release Candidates for .NET 8
Sunday, September 17, 2023
Microsoft shipped the first release candidates for its .NET 8 #472 – September 18, 2023 View in browser C# Digest What's New in First Release Candidates for .NET 8 Microsoft shipped the first
Expression Parsing Made Easy
Sunday, September 10, 2023
Dive into Pratt or “top-down operator precedence” parsers #471 – September 11, 2023 View in browser C# Digest Expression Parsing Made Easy Every now and then, I stumble onto some algorithm or idea
The "Weak Event" Pattern in C#
Sunday, September 3, 2023
Events have a significant drawback: the publisher holds a strong reference to the subscriber #470 – September 04, 2023 View in browser C# Digest The "Weak Event" Pattern in C# Events in C#
Struct memory layout optimizations
Sunday, August 27, 2023
We could store the exact same information in several ways, leading to space savings of 66% #469 – August 28, 2023 View in browser C# Digest Struct memory layout optimizations, practical considerations
You Might Also Like
Import AI 399: 1,000 samples to make a reasoning model; DeepSeek proliferation; Apple's self-driving car simulator
Friday, February 14, 2025
What came before the golem? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Defining Your Paranoia Level: Navigating Change Without the Overkill
Friday, February 14, 2025
We've all been there: trying to learn something new, only to find our old habits holding us back. We discussed today how our gut feelings about solving problems can sometimes be our own worst enemy
5 ways AI can help with taxes 🪄
Friday, February 14, 2025
Remotely control an iPhone; 💸 50+ early Presidents' Day deals -- ZDNET ZDNET Tech Today - US February 10, 2025 5 ways AI can help you with your taxes (and what not to use it for) 5 ways AI can help
Recurring Automations + Secret Updates
Friday, February 14, 2025
Smarter automations, better templates, and hidden updates to explore 👀 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
The First Provable AI-Proof Game: Introducing Butterfly Wings 4
Friday, February 14, 2025
Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? undefined The Market Today #01 Instagram (Meta) 714.52 -0.32%
GCP Newsletter #437
Friday, February 14, 2025
Welcome to issue #437 February 10th, 2025 News BigQuery Cloud Marketplace Official Blog Partners BigQuery datasets now available on Google Cloud Marketplace - Google Cloud Marketplace now offers
Charted | The 1%'s Share of U.S. Wealth Over Time (1989-2024) 💰
Friday, February 14, 2025
Discover how the share of US wealth held by the top 1% has evolved from 1989 to 2024 in this infographic. View Online | Subscribe | Download Our App Download our app to see thousands of new charts from
The Great Social Media Diaspora & Tapestry is here
Friday, February 14, 2025
Apple introduces new app called 'Apple Invites', The Iconfactory launches Tapestry, beyond the traditional portfolio, and more in this week's issue of Creativerly. Creativerly The Great
Daily Coding Problem: Problem #1689 [Medium]
Friday, February 14, 2025
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given a linked list, sort it in O(n log n) time and constant space. For example,
📧 Stop Conflating CQRS and MediatR
Friday, February 14, 2025
Stop Conflating CQRS and MediatR Read on: my website / Read time: 4 minutes The .NET Weekly is brought to you by: Step right up to the Generative AI Use Cases Repository! See how MongoDB powers your