You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are many converts or calculations called Int.BigInt(). Even though the Int structure already contains i *big.Int, new pointer memory is still reallocated. So is there any way that we can reuse the buffer?
I tried returning Int.i directly in my local instead of declaring new memory and here are the benchmark results. However, I'm not sure if direct access poses any danger. Love to hear everyone's opinions.
I think the aim was to avoid mutation of the original Int object. However, we can have two APIs -- one that returns a copy and one that returns the field (allowing mutation).
I think the aim was to avoid mutation of the original Int object. However, we can have two APIs -- one that returns a copy and one that returns the field (allowing mutation).
That would be great! Also do u want me to make a pr?
There are many converts or calculations called
Int.BigInt()
. Even though theInt
structure already containsi *big.Int
, new pointer memory is still reallocated. So is there any way that we can reuse the buffer?I tried returning
Int.i
directly in my local instead of declaring new memory and here are the benchmark results. However, I'm not sure if direct access poses any danger. Love to hear everyone's opinions.The text was updated successfully, but these errors were encountered: