Fast File IO with .NET 6
summary
.NET 6 rewrites file I/O and shows concrete wins: benchmarks (BenchmarkDotNet + profilers) report reduced syscalls, much lower allocations and large latency drops — seeking forward and async reads/writes measure up to 50x faster in microbenchmarks, async writes up to ~5x faster and reads ~2x faster, with allocation-free steady-state after the first call. New APIs include File.OpenHandle and RandomAccess plus scatter/gather writes; disabling buffering and using 64 KB buffers or the scatter API cuts syscall overhead.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:33File stream basics
- 11:57Buffering and performance tips
- 18:03Async file IO necessity
- 26:08Position tracking improvements
- 33:44Async write optimizations
- 41:40Read async optimizations
- 46:51Performance gains summary
- 47:13New APIs in .NET 6
- 58:21Performance recap and tips
- 1:02:38Q&A and closing
related talks
01h 04mWhat is new in .NET 6 and the future of .NET
56mState of the .NET Performance
48mWhy I’m Not Leaving .NET
47mUnlocking Performance Improvements in .NET
46mDeep dive into .NET performance and native AOT
37mRock Your Code Code and App Performance for Microsoft .Net
01h 04mTurbocharged: Writing High-Performance C# and .NET Code
46mWhat Is New in .Net 6 and the Future of .Net
