Skip to content

⚡ Optimize find program key by adding static buffers and reusing the same SHA256 while finding an off-curve key#62

Open
Kuldotha wants to merge 2 commits intomasterfrom
feat/optimize-find-program-key
Open

⚡ Optimize find program key by adding static buffers and reusing the same SHA256 while finding an off-curve key#62
Kuldotha wants to merge 2 commits intomasterfrom
feat/optimize-find-program-key

Conversation

@Kuldotha
Copy link
Contributor

| :Ready: | :Refactor: | :yes: | :--: |

Problem

A lot of garbage was being created while trying to find PDAs.

Solution

Merge Create and Find so the Sha256 instance can be reused. This alone reduces garbage created by 75%. Also removed memory stream and push the byte arrays directly into the Sha256 instance.

@notdanilo
Copy link

Nice one!

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