You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (JIRA)" <ji...@apache.org> on 2019/06/03 12:27: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 ]

Antoine Pitrou updated ARROW-3891:
----------------------------------
    Component/s: Java

> [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
>          Components: Java
>            Reporter: Animesh Trivedi
>            Assignee: Animesh Trivedi
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.12.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> 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)