Improved performance of System.Reflection.Emit API (dotnet/coreclr#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)
commit0f9a001667eb53de9af636d594ec166625790e36
tree267304cddea1bbf3c0294bd1e8de9a6c94858371
parent7c7ee2cab860863eb6502c43e28a0f9244f44c41
Improved performance of System.Reflection.Emit API (dotnet/coreclr#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

Commit migrated from https://github.com/dotnet/coreclr/commit/77a5f9cef77c34db739bb3c13bfd091c693a12d4
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ILGenerator.cs
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs