Last Updated: May 22, 2026
Reflection trades raw speed for flexibility. Every operation the compiler would normally inline becomes a runtime dance through interface boxing, type lookups, and small allocations. This chapter covers why reflection is slow, real benchmark numbers comparing direct access to reflect.Value access, caching strategies that recover most of the cost, and the alternatives (code generation, generics, plain interfaces) that avoid the cost entirely.