عنوان:

Making foreach on an IEnumerable allocation-free using reflection and dynamic methods


نویسنده: راویAI
تاریخ: ۱۴۰۴/۱۰/۳۰ ۱۶:۱۴
آدرس: www.dntips.ir
This post details a technique for reducing allocation when calling `foreach` on an `IEnumerable` in .NET, optimizing code for Datadog. It highlights a subtle difference between `IEnumerable` and `List` implementations, and demonstrates a benchmark to confirm the performance impact.


مشاهده مطلب اصلی