C# Digest - CD#549 Object Pools in C#

͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­ ͏ ‌     ­

March 23, 2025 | Read Online

Object Pools in C#: Examples, Internals and Performance Benchmarks
8 minutes by Alexey Fedorov

In this guide Alexey explains how Object Pool is implemented in C# through ObjectPool and ArrayPool classes. He examines how these pools work internally and presents benchmark results showing that while object pooling typically improves performance in single-threaded scenarios by 10-50%, it may perform worse in multithreaded scenarios with small objects due to thread synchronization overhead.

WeAreDevelopers World Congress 2025 – July 9-11, Berlin
sponsored by WeAreDevelopers

The world's leading event for developers is back. Join 15,000+ developers and 500+ experts as they explore everything from AI and Cybersecurity to Cloud, DevOps, and Web Development. Gain insights into modern .NET development, performance optimization, and cloud-native applications with top speakers from Microsoft, GitHub, and many more. Use code "WWC25_C5DIGEST" for 5% off your ticket.

.NET Heisenbug Mystery Theater: How Did an Exception Escape its Catch Block?
10 minutes by Aaron Stannard

Aaron describes a complex bug in the Akka.NET system related to the SelectAsync stage. Due to non-atomic assignment of struct values, a race condition occurred when a Result struct was being written on one thread while being read on another, resulting in null Exception values escaping catch blocks. The issue manifested as mysterious ArgumentException errors claiming "Cancellation cause must not be null." The fix involved simplifying the code by ensuring all struct operations happened on the same thread through AsyncCallback rather than adding complex synchronization mechanisms.

The key new features in .NET 10
7 minutes by Simon Bisson

In this post Simon presents the first preview of .NET 10, a long-term support release building on the current .NET version with focus on performance and reliability. Key improvements include runtime optimizations that reduce abstraction overhead for arrays, support for upcoming processor architecture features like AVX 10.2, enhancements to ASP.NET Core and Blazor, upgraded OpenAPI support, and developer productivity features such as better string sorting with numerals.

RESTful API Best Practices for .NET Developers
13 minutes by Mukesh Murugan

I’ve put together this guide to help .NET developers like you understand REST principles and build better APIs. Whether you’re just starting out or looking to refine your skills, this article covers RESTful architecture, best practices, and how to implement them in ASP.NET Core. Let’s dive in and make your API development journey smoother and more efficient.

New HybridCache in .NET9
11 minutes by Marek Sirkovský

Marek dives deep into A New Two-Level Caching Solution for .NET HybridCache that is Microsoft's new caching library for .NET 9 that introduces a two-level caching mechanism using IMemoryCache and optional IDistributedCache. While it offers valuable features like cache stampede prevention and performance optimizations, it has limitations including a restricted API surface, dependency on abstract classes instead of interfaces, and fewer advanced features compared to third-party solutions like FusionCache or CacheTower.

And the most popular article from the last issue was:

newsletters


Would you like to advertise in the newsletter? Check out our media kit and get in touch.


Older messages

CD#548 Walking the reference graph for .NET garbage collector

Tuesday, March 18, 2025

Using reference tracking for a .NET garbage collector in C# ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏

CD#547 Writing a .NET profiler in C# 

Sunday, March 9, 2025

CPU profiler for .NET using Silhouette ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏

C#546 Finalizers are tricker than you think

Sunday, March 2, 2025

Common pitfalls when implementing finalizers ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

C#545 .NET MAUI Performance Features in .NET 9

Thursday, February 27, 2025

with full trimming and NativeAOT support ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

C#539 A detailed look at EF Core’s JSON Columns feature

Sunday, January 12, 2025

Comparing it with the traditional tables with indexes ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

You Might Also Like

LW 175 - Shopify uses AI to Prepare Stores for Script Editor Deprecation

Tuesday, March 25, 2025

Shopify uses AI to Prepare Stores for Script Editor Deprecation ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ Shopify Development news and

Reminder: Microservices rules #7: Design loosely design-time coupled services - part 1

Tuesday, March 25, 2025

You are receiving this email because you subscribed to microservices.io. Considering migrating a monolith to microservices? Struggling with the microservice architecture? I can help: architecture

Delete your 23andMe data ASAP 🧬

Tuesday, March 25, 2025

95+ Amazon tech deals; 10 devs on vibe coding pros and cons -- ZDNET ZDNET Tech Today - US March 25, 2025 dnacodegettyimages-155360625 How to delete your 23andMe data and why you should do it now With

Post from Syncfusion Blogs on 03/25/2025

Tuesday, March 25, 2025

New blogs from Syncfusion ® Create AI-Powered Smart .NET MAUI Data Forms for Effortless Data Collection By Jeyasri Murugan This blog explains how to create an AI-powered smart data form using our .NET

ALERT: Critical Ingress NGINX Controller Vulnerability Allows RCE Without Authentication

Tuesday, March 25, 2025

THN Daily Updates Newsletter cover ⚡ LIVE WEBINAR ➟ How to Eliminate Identity-Based Threats From Phishing to Device Risks: Learn to Remove Entire Threat Classes Effortlessly Download Now Sponsored

🍏 Hey Apple, Give Me a Cellular MacBook — Tips For Building a Period Retro Gaming PC

Tuesday, March 25, 2025

Also: Google Pixel 9a vs. iPhone 16e, and More! How-To Geek Logo March 25, 2025 Did You Know 3 Musketeers candy bars used to have three flavored pieces in each bar: vanilla, chocolate, and strawberry.

⚙️ Altman moves around

Tuesday, March 25, 2025

Plus: AI powers massive surge in cyber attacks ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

The Sequence Knowledge #517: A Summary of our Series About RAG

Tuesday, March 25, 2025

10 editions that covered the fundamental RAG methods in generative AI. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Why blocking spammers doesn't work

Tuesday, March 25, 2025

Hey there, Right now, your personal information is sitting in massive databases, waiting to be sold. Data brokers have your name, phone number, email—even your medical records and SSN. They sell it to

Greenlandia 🇬🇱

Tuesday, March 25, 2025

What passes for popular culture in Greenland. Here's a version for your browser. Hunting for the end of the long tail • March 24, 2025 Hey all, Ernie here with a pretty significant refresh of a