.NET 8 vs .NET 10: Benchmarking FFT, I/O, Image Processing, JSON, and LINQ
.NET 8 vs .NET 10: Benchmarking FFT, I/O, Image Processing, JSON, and LINQ 🚀
Performance improvements are easy to talk about and hard to validate. With .NET 10 arriving, I wanted to understand what actually changed at the runtime level, not what looks good in release notes.
This article continues my .NET 8 vs .NET 10 benchmarking series and focuses on workloads that appear in real systems but often get ignored:
Fast Fourier Transform (FFT)
File I/O
Image processing
JSON processing
LINQ and parallel execution
Same code. Same inputs. Same machine.
Only the runtime changes.
🧪 Benchmark Configuration
All benchmarks were executed using BenchmarkDotNet, which automatically adjusts iteration counts based on execution time:
Nanoseconds: ~100 iterations
Microseconds–milliseconds: ~15–50 iterations
Seconds: ~10–15 iterations
Test Parameters
Threading: 10,000 tasks per test
Matrix operations: 100×100
BigInteger: 4096-bit numbers
Prime generation: first 10,000 primes
Image processing: 3840×2160 (4K)
WebSocket: 10–100 messages per connection
JSON: nested objects up to 10 levels
LINQ: 10,000-element collections

🔊 Fast Fourier Transform (FFT)
FFT workloads are common in signal processing, audio analysis, and scientific computing.
Results Summary
Cooley–Tukey FFT: +3.4% faster
Naive DFT: -2.0% slower
Optimized FFT algorithms benefit slightly from runtime improvements, while naive implementations remain largely unchanged.
Takeaway:
FFT improvements exist, but they are incremental. If FFT performance is critical, algorithm choice still matters more than runtime version.

💾 File I/O Benchmarks
This benchmark writes and reads a 100 MB file.
Results Summary
FileWriteRead: -1.1% This is effectively noise.
Disk and filesystem latency dominate here, not the runtime.
Takeaway:
If your application is I/O-bound, upgrading the runtime won’t magically make it faster. Focus on buffering, async I/O, and storage choices instead.

🖼 Image Processing
Image processing benchmarks are extremely sensitive to memory access patterns, CPU cache behavior, and instruction selection.
Results Summary
3×3 convolution: -4.2%
5×5 convolution: -5.6%
7×7 convolution: -39.7%
The larger the kernel, the bigger the regression.
Why this happens:
Small runtime changes can significantly affect cache locality and vectorization. Larger convolution kernels amplify these effects.
Takeaway:
If your application does heavy image processing, you should benchmark carefully before upgrading.

📦 JSON Processing
This is where .NET 10 clearly stands out 💥
Results Summary
Newtonsoft deep nesting: +20.9%
Newtonsoft JObject modification: +17.2%
Span-based deserialization: +22.3%
System.Text.Json deep nesting: +27.1%
JsonNode modification: +23.8%
Streaming JSON: +28.9%
Allocations mostly stayed flat, which makes these wins even more impressive.
Takeaway:
If your system handles APIs, events, logs, or message pipelines, JSON performance gains alone may justify upgrading.

🔗 LINQ and Parallel Operations
LINQ remains one of the most complex areas to optimize.
Results Summary
Compiled expressions: +20.6%
Nested joins (LINQ): +15.8%
Nested joins (manual): +20.9%
PLINQ CPU workloads: +16.4%
Parallel.ForEach CPU: +4.1%
Direct delegate invocation: -3.7%
SelectMany LINQ: -39.5%
Some paths improved dramatically. Others regressed just as dramatically.
Why this matters:
LINQ performance depends heavily on query shape, nesting depth, and execution strategy. One optimization can help some scenarios while hurting others.
Takeaway:
LINQ users should benchmark their real queries, not assume global improvements.

🧠 Final Thoughts
These benchmarks reinforce a few important truths:
.NET 10 brings real, measurable improvements
Gains are highly workload-dependent
Some regressions are unavoidable and must be measured
JSON and many LINQ paths are clear winners
I/O remains mostly unchanged
There is no universal answer to “Is .NET 10 faster?”
The only honest answer is: It depends on what you run.
If performance matters in your system, run your own benchmarks. Numbers from your workload will always beat numbers from mine.
Happy benchmarking 🔍
No comments yet. Be the first to share your thoughts!