Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add well-known OIDs to System.Formats.Asn1
This adds most of the OIDs that are read or written during the execution of any of the crypto tests or SslStream tests as a well-known pattern of bytes and a pre-allocated/ const/interned string. Reading a well-known OID drops from ~300ns to ~60ns and saves on allocating the output string, and possibly an `int[]` in BigInteger for large-RID OIDs, while increasing the cost for a less well-known OID by about 40ns. Writing a well-known OID drops from ~1200ns to ~90ns, and increases the cost for a less well-known OID by only about 10ns. For purposes of this initial list, an oid was well-known if (more or less): * It was the output of ReadObjectIdentifier more than twice, and * It was not a facetious/test value (e.g. 0.0), and * It was not a vendor-specific Certificate Practices Statement; or * It was an obviously linked OID potentially skewed out by our test data * e.g. EcdsaWithSha512 would be automatically included by closeness to EcdsaWithSha256.
- Loading branch information
Showing
4 changed files
with
459 additions
and
16 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
Oops, something went wrong.