This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize GC.AllocateUninitializedArray and use it in StringBuilder (#…
…27364) * use GC.AllocateUninitializedArray for allocating internal char buffers * force inlining of AllocateUninitializedArray to have no perf hit on the small buffers hot path * insrease the threshold from 256 to 2048 bytes * use Unsafe.As instead of a cast * remove the size precondition from AllocateNewArray method, the called AllocateSzArray is responsible for handling negative size
- Loading branch information
1 parent
7bc2158
commit c382edf
Showing
4 changed files
with
46 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters