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:
“The child to be concerned about is the one who is actively unhappy, [in school].... In the long run, a childs emotional development has a far greater impact on his life than his school performance or the curriculums richness, so it is wise to do everything possible to change a situation in which a child is suffering excessively.”
—Dorothy H. Cohen (20th century)
“Still be kind,
And eke out our performance with your mind.”
—William Shakespeare (15641616)
“There are people who think that wrestling is an ignoble sport. Wrestling is not sport, it is a spectacle, and it is no more ignoble to attend a wrestled performance of suffering than a performance of the sorrows of Arnolphe or Andromaque.”
—Roland Barthes (19151980)