Skip to content

Add const generic to Hrp to reduce its size #217

@nazar-pc

Description

@nazar-pc

Hrp right now stores an array with 83 bytes and a size on top of that. On 64-bit platform that is 91 byte to carry around, which is unfortunate since in most cases human-readable part is just a few characters.

The size can be changed to just u8 and be sufficient, but I think the bigger problem is max allocation for the buffer upfront. It'd be nice to try and make the size of the buffer const generic, but I'm not yet sure how wide the implications for that will be in terms of API changes.

Originally suggested in #216 (comment)

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