Matt Warren 12/14/2016

Why is reflection slow?

Read Original

This technical article investigates the performance overhead of reflection in .NET. It analyzes the CLR type system's design, which prioritized other factors over reflection speed, and details the internal 'hot'/'cold' data structures (MethodTable, EEClass). The post walks through the complex call stack of a reflection invocation and explains the costs of fetching metadata (FieldInfo/MethodInfo) before method execution.

Why is reflection slow?

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser