Demo: Benchmarking Boxing And Unboxing
The lesson shows the Benchmark.NET setup used to compare one million integer additions with and without boxing, explaining how the benchmark eliminates OS noise by enforcing high-performance mode and averaging many runs. We present the benchmark results showing that boxing makes the code more than ten times slower.
Previous Module
A Crash Course In Intermediate Language
This Module
Basic Performance Optimizations