Skip to content

Add zero-copy constructor for BigUint for 64 bit platforms #336

@pistomat

Description

@pistomat

If I want to convert a Vec<u64> to BigUint, I need to first convert it to Vec<u32> manually and then BigUint::new converts it back to Vec<BigDigit = u64> internally.

From other issues I gather that you don't want to expose BigDigit arguing cross platform compatibility. Can we then add new methods i.e. BigUint::new_u64(digits: Vec<u64>) that would be a zero-copy constructor on 64 bit platforms?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions