Skip to content

Specialize BitArray equality to improve performance. #21

@modulovalue

Description

@modulovalue

I've noticed that BitArray equality could be specialized to be more efficient when two BitArray instances are being compared.

An is check would probably be fine (i.e. #18 (comment)) which could be used to introduce a fast path that uses for loops over the underlying buffers instead of having to use iterators (as is currently being done in the base BitSet implementation).

Furthermore, I feel like inlining the fold in hashCode might give us some easy gains, too. I'm not sure about the overhead of fold and the closure... JIT might be able to deal with it just fine, but I have doubts about AOT.

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