Closed kiminuo closed 1 year ago
Sorry for taking long looking at that
Note that this PR because of not supporting lowercase is allocating way more.
Note that this PR because of not supporting lowercase is allocating way more.
Yes. Unfortunately, it's true but there is no way out of this. It's a bit bad luck that NBitcoin picked it one way and .NET the other way. But hopefully, they'll address it soon. Please upvote the issues if you can.
Master branch (20965133)
Master + the PR's first commit (bd2e61b1)
Encode
is about 2.5 times faster. The reason why it is so fast is because .NET uses a vectorized implementation for HEX encoding.The issue with this commit is that the resulting hexadecimal strings are capitalized. Please upvote https://github.com/dotnet/runtime/issues/58937, https://github.com/dotnet/runtime/issues/73026, and https://github.com/dotnet/runtime/issues/60393 if you like.
This PR (bc496179)
Encode
is about 1.2 times faster.Resources