num-bigint icon indicating copy to clipboard operation
num-bigint copied to clipboard

Feature Request: Ref type for {BigInt|BigUint}

Open TennyZhuang opened this issue 1 year ago • 2 comments

Propose to introduce the BigIntRef and BigUintRef type, and the definition should be:

struct BigUintRef<'a> {
    data: &'a [BigDigit],
}
struct BigIntRef<'a> {
    sign: Sign,
    data: BigUintRef<'a>,
}

And implement all ops on them.

The feature is useful when we want to store a list of BigInt or BigUint in a flatten memory and apply op on them without a whole clone.

TennyZhuang avatar Sep 08 '23 02:09 TennyZhuang