Solana.Unity-Core icon indicating copy to clipboard operation
Solana.Unity-Core copied to clipboard

:zap: Optimize find program key by adding static buffers and reusing the same SHA256 while finding an off-curve key

Open Kuldotha opened this issue 6 months ago • 1 comments

| :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.

Kuldotha avatar Apr 26 '25 10:04 Kuldotha