m-v-w opened a new issue, #45559: URL: https://github.com/apache/arrow/issues/45559
### Describe the enhancement requested The C# implementation of the BitUtility helper class seems to allocate an array every time GetBit is called: ``` private static ReadOnlySpan<byte> BitMask => new byte[] { 1, 2, 4, 8, 16, 32, 64, 128 }; public static bool GetBit(ReadOnlySpan<byte> data, int index) => (data[index / 8] & BitMask[index % 8]) != 0; ``` using a static cached BitMask array or creating the bit mask using a shift operator should increase performance. ### Component(s) C# -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org