You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (JIRA)" <ji...@apache.org> on 2014/11/10 23:07:34 UTC

[jira] [Commented] (CALCITE-460) Add ImmutableBitSet and replace uses of BitSet

    [ https://issues.apache.org/jira/browse/CALCITE-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14205412#comment-14205412 ] 

Vladimir Sitnikov commented on CALCITE-460:
-------------------------------------------

JDK BitSet is just
{code:java}
    /**
     * The internal field corresponding to the serialField "bits".
     */
    private long[] words;

    /**
     * The number of words in the logical size of this BitSet.
     */
    private transient int wordsInUse = 0;

    /**
     * Whether the size of "words" is user-specified.  If so, we assume
     * the user knows what he's doing and try harder to preserve it.
     */
    private transient boolean sizeIsSticky = false;
{code}

How do you plan to make it more compact?

> Add ImmutableBitSet and replace uses of BitSet
> ----------------------------------------------
>
>                 Key: CALCITE-460
>                 URL: https://issues.apache.org/jira/browse/CALCITE-460
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>
> Calcite makes heavy use of bit sets. java.util.BitSet has a convenient API but (a) is mutable, (b) uses quite a lot of memory, (c) is not iterable.
> Propose to implement ImmutableBitSet, which addresses those deficiencies.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)