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

Address fragmentation issue caused by andNot method #76

Open
lemire opened this issue May 18, 2021 · 0 comments
Open

Address fragmentation issue caused by andNot method #76

lemire opened this issue May 18, 2021 · 0 comments

Comments

@lemire
Copy link
Owner

lemire commented May 18, 2021

In some cases, the andNot function can cause fragmentation: the insertion of zero literal words inside the bitmap. One can produce it with the following code:

        EWAHCompressedBitmap one = new EWAHCompressedBitmap();
        EWAHCompressedBitmap other = new EWAHCompressedBitmap();
        one.set(16627);
        other.set(52811);
        other = other.and(one);
        one = one.andNot(other);
        one.set(16039);
        other.set(78669);
        other = other.or(one);
        one = one.and(other);
        other = other.andNot(one);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant