Skip to content

Feat/zero alloc api#4

Merged
unsafePtr merged 35 commits intomasterfrom
feat/zero-alloc-api
Apr 22, 2026
Merged

Feat/zero alloc api#4
unsafePtr merged 35 commits intomasterfrom
feat/zero-alloc-api

Conversation

@unsafePtr
Copy link
Copy Markdown
Owner

No description provided.

…/decode

Split DecodeGenericCore, DecodeGenericToArray, EncodeGenericToString, and
EncodeGenericToBytes so the stackalloc fast-path (<=512 B) is try/finally-free,
letting the JIT allocate registers more aggressively. Also add [SkipLocalsInit]
to ComputeBitcoin32/64FastRaw, remove redundant clearArray:true on ArrayPool
returns, and add AllowUnsafeBlocks to the project.
typeof(TAlphabet) == typeof(BitcoinAlphabet) replaces ReferenceEquals,
letting the JIT constant-fold the fast-path dispatch per specialization.
Alphabet data moves from instance fields to static abstract interface
members on IBase58Alphabet, making Base58<TAlphabet> a zero-field type.
@unsafePtr unsafePtr merged commit 9b6dbf1 into master Apr 22, 2026
1 check failed
@unsafePtr unsafePtr deleted the feat/zero-alloc-api branch April 27, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant