This is lesson 3 of 11 in this module Course 64% complete

Demo: Benchmarking Boxing And Unboxing

Premium Content

Sign in with your account or join us to access this lesson.

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.