EngineeringSenior DeveloperTechnical Sessions

Session 05: Performance, Memory & Diagnostics

Premium

Mục tiêu: Viết code hiệu năng cao, hiểu async internals, và sử dụng diagnostic tools chuyên nghiệp.


1. Benchmarking với BenchmarkDotNet

csharp
// Cài: dotnet add package BenchmarkDotNet
[MemoryDiagnoser]            // Đo memory allocation
[RankColumn]                 // Xếp hạng
[SimpleJob(RuntimeMoniker.Net90)]
public class StringConcatBenchmarks
{
    private readonly string[] _items = Enumerable.Range(0, 1000)
        .Select(i => $"item-{i}")
        .ToArray();

    [Benchmark(Baseline = true)]
Premium

Continue with premium access

Session 05: Performance, Memory & Diagnostics is part of the premium library. Sign in with a premium account to unlock the full lesson and the rest of this track.

01 Full premium lesson access
02 Deeper implementation notes
03 Ongoing content updates