Skip to content

Conversation

@soniseth0
Copy link
Contributor

use a sync.Pool to reuse sha3.NewLegacyKeccak256 instances in checksumHex, reset the hasher before every use and return it to the pool to retain existing behaviour, keep functional output identical while removing the per-call allocation cost

@MariusVanDerWijden
Copy link
Member

I don't think this is necessary. The checksum formatting is not used in critical paths anywhere on the node, so I don't think that this will save a significant number of allocations

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.

2 participants