Special-case 1 module per assembly in Assembly.GetTypes/DefinedTypes (#22825)
authorStephen Toub <stoub@microsoft.com>
Tue, 26 Feb 2019 03:17:19 +0000 (22:17 -0500)
committerGitHub <noreply@github.com>
Tue, 26 Feb 2019 03:17:19 +0000 (22:17 -0500)
commit8509bbd72ed937a626fc436715b962d3f86fa380
tree79d5e70276296ec1f6e97fc5cc06abcc614006e1
parentaf6d24190078f64f892a60967f69c86d838f06c2
Special-case 1 module per assembly in Assembly.GetTypes/DefinedTypes (#22825)

It's very common for an assembly to have only one module, in which case we can avoid unnecessary allocations and copies in Assembly.GetTypes() and Assembly.DefinedTypes.
src/System.Private.CoreLib/shared/System/Reflection/Assembly.cs
src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs