Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate BitSet optimizations #1486

Closed
l0rinc opened this issue Aug 12, 2016 · 3 comments
Closed

Investigate BitSet optimizations #1486

l0rinc opened this issue Aug 12, 2016 · 3 comments

Comments

@l0rinc
Copy link
Contributor

l0rinc commented Aug 12, 2016

Extends #1334

Similarly to how #1480 reimplements CharSeq based on Vector to enable many constant time operations, we should consider rebasing BitSet on Vector also, to enable constant time modifications, instead of the current linear ones.

However, we should also consider the non-boxed version (see #1484) of Vector, as we're storing primitives here exclusively.

@ruslansennov, @danieldietrich?

@danieldietrich
Copy link
Contributor

I think my comment on CharSeq optimization also applies here. We should stay with the current impl in favor of a better memory footprint.

From wikipedia: "A bit array is effective at exploiting bit-level parallelism in hardware to perform operations quickly." That said using a Vector as backend we loose important characteristics of our low-level implementation.

Let's stay with our current impl please.

@danieldietrich danieldietrich added this to the 2.1.0 milestone Aug 14, 2016
@l0rinc
Copy link
Contributor Author

l0rinc commented Aug 16, 2016

Does the primitive-enabled Vector change the picture (i.e. same memory footprint, with constant add, instead of linear one)?

@danieldietrich danieldietrich modified the milestones: 2.2.0, 2.1.0 Aug 23, 2016
@danieldietrich danieldietrich modified the milestones: 2.1.0, 2.2.0 Oct 23, 2016
@danieldietrich danieldietrich modified the milestones: 3.0.0, 2.1.0 Mar 5, 2017
@danieldietrich danieldietrich modified the milestones: vavr-1.0.0, vavr-1.1.0 Nov 26, 2017
@danieldietrich
Copy link
Contributor

BitSet will probably not part of Vavr 1. We want to focus on the most frequently used collections. Maybe we will release some kind of add-on collections package later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants