You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Animesh Trivedi (JIRA)" <ji...@apache.org> on 2018/11/27 10:45:00 UTC
[jira] [Created] (ARROW-3891) [Java] Remove Long.bitCount with
simple bitmap operations
Animesh Trivedi created ARROW-3891:
--------------------------------------
Summary: [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
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)