JingsongLi commented on a change in pull request #8278:
[FLINK-12335][Table-runtime]Improvement the performance of class SegmentsUtil
URL: https://github.com/apache/flink/pull/8278#discussion_r285873246
##########
File path:
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
##########
@@ -417,7 +415,7 @@ private static boolean inFirstSegment(MemorySegment[]
segments, int offset, int
* @param index bit index from base offset.
*/
public static void bitUnSet(MemorySegment segment, int baseOffset, int
index) {
- int offset = baseOffset + ((index & BIT_BYTE_POSITION_MASK) >>>
3);
+ int offset = baseOffset + (index >>> 3);
byte current = segment.get(offset);
current &= ~(1 << (index & BIT_BYTE_INDEX_MASK));
Review comment:
It seems that `BIT_BYTE_INDEX_MASK` is not needed either.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services