Improved performance of System.Reflection.Emit API (#23833)
authorBenjamin Bartels <bartels.benjamin@tutanota.de>
Mon, 15 Apr 2019 22:09:10 +0000 (23:09 +0100)
committerJan Kotas <jkotas@microsoft.com>
Mon, 15 Apr 2019 22:09:10 +0000 (15:09 -0700)
commit77a5f9cef77c34db739bb3c13bfd091c693a12d4
treef93917ab845741e787b87cd8b1bf436f55b8b8e3
parent5155a6785420459c065e9415843309b43c0508f2
Improved performance of System.Reflection.Emit API (#23833)

* Improved performance of System.Reflection.Emit API

* Moved heap allocation to stack

* Eliminating conditional branch by casting sbyte to byte

* Reduced heap allocation of ScopeTree

* Removed redundant `unsafe` from function signature
src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs
src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs