Skip to content

Optimize conversion to Natural. #600

@lehins

Description

@lehins

Current converters of ByteString and ByteArray to Natural in Cardano.Crypto.Utils first unnecessarily convert to Integer and the later convert it to Natural

There are exactly the same primitve operations available for Natural conversion in GHC.Num.Natural as there are for GHC.Num.Integer, thus such intermediate step can be avoided.

Additional property testing to make sure such switch is safe will be required.

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