Skip to content

Optimization: decode a single ID without allocating an array #53

@michaldivis

Description

@michaldivis

Hi,

I'd like to propose an optimization for the Decode method. I'll be decoding a single ID most of the time, so it might make sense to add add the following methods:

//decode a single int ID from a hash
int DecodeSingle(string hash);

//decode a single long ID from a hash
long DecodeSingleLong(string hash);

This approach would not require allocating an array for returning single values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions