Skip to content

Avoid marshaling unused bytes from the last uint64 in the bitVector to reduce bit overhead #11

@meling

Description

@meling

We could replace the []uint64 bit vector implementation we currently use with a []byte implementation. This can save up to 7 bytes per bit vector in unlucky cases, where the bit vector must use one additional uint64 when the vector's size isn't divisible by 64.

Note, however, that initial experiments with a []byte implementation seem to indicate that it is slightly slower to call bv.Set(). I have not tested it in BBHash.

We should benchmark the two implementations and compare them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceCan possibly improve performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions