x/crypto/ed25519: Use sync.Pool to reuse hash.Hash #30302
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
In Ed25519 package, every signing and verifying calls create a new SHA-512
hash.Hash
by callingsha512.New
.Thinking of scenarios where multiple calls are made to those functions (e.g., in an HTTP handler), using a
sync.Pool
to store thosehash.Hash
and reuse them would optimize both performance and memory usage.The text was updated successfully, but these errors were encountered: