This is lesson 10 of 11 in this module Course 76% complete

Demo: Lists and Arrays in Intermediate Language

Premium Content

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

We disassemble the benchmark DLL to show that ArrayList.Add boxes every integer, generic List.Add uses a compact three-instruction typed call, and a direct array assignment uses the IL stelem instruction with no method call overhead. The lesson demonstrates how method-call overhead and range checks account for the measurable performance gap between a list and an array.