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

Garbage-free on-curve check

Open Kuldotha opened this issue 10 months ago • 0 comments

When using BigInteger, internally an array is allocated to hold the data for the BigInteger. This scales dynamically when using the BigInteger. Because they are immutable, every operation with these BigIntegers creates a new BigInteger, allocating more arrays. This generates a lot of garbage, and especially in a performance-critical context like game development it can create issues.

A solution could be an allocation-free BigInteger implementation, or a different way to calculate wether a point is on- or off-curve where we don't need BigInteger.

Kuldotha avatar Apr 26 '25 10:04 Kuldotha