You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/27 11:47:00 UTC

[jira] [Updated] (ARROW-3891) [Java] Remove Long.bitCount with simple bitmap operations

     [ https://issues.apache.org/jira/browse/ARROW-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated ARROW-3891:
----------------------------------
    Labels: pull-request-available  (was: )

> [Java] Remove Long.bitCount with simple bitmap operations
> ---------------------------------------------------------
>
>                 Key: ARROW-3891
>                 URL: https://issues.apache.org/jira/browse/ARROW-3891
>             Project: Apache Arrow
>          Issue Type: Sub-task
>            Reporter: Animesh Trivedi
>            Assignee: Animesh Trivedi
>            Priority: Major
>              Labels: pull-request-available
>
> the `public int isSet(int index)` routine checks if the bit is set by calling Long.bitCount function. This is unnecessary and creates performance degradation. This can simply be replaced by bit shift and bitwise & operation. 
> `return Long.bitCount(b & (1L << bitIndex));`
> to 
> `return (b >> bitIndex) & 0x01;` 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)