Performance
Performance of delegates used to be much slower than a virtual or interface method call (6 to 8 times slower in Microsoft's 2003 benchmarks), but, since the .NET 2.0 CLR in 2005, it is about the same as interface calls. This means there is a small added overhead compared to direct method invocations.
There are very stringent rules on the construction of delegate classes. These rules permit optimizing compilers a great deal of leeway when optimizing delegates while ensuring type safety.
Delegates are a variation of closures.
Read more about this topic: Delegate (.NET)
Famous quotes containing the word performance:
“To vote is like the payment of a debta duty never to be neglected, if its performance is possible.”
—Rutherford Birchard Hayes (18221893)
“No performance is worth loss of geniality. Tis a cruel price we pay for certain fancy goods called fine arts and philosophy.”
—Ralph Waldo Emerson (18031882)
“Just as the performance of the vilest and most wicked deeds requires spirit and talent, so even the greatest demand a certain insensitivity which under other circumstances we would call stupidity.”
—G.C. (Georg Christoph)