Skip to content

Commit

Permalink
also do it in calcNumShards
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoramirez committed Dec 20, 2024
1 parent 2ba691b commit dd3d1ab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private void calculateNumShards() {
}

long bitsPerKeyElement = 64 - Long.numberOfLeadingZeros(maxKeyOrdinal + 1);
long bitsPerValueElement = 64 - Long.numberOfLeadingZeros(maxValueOrdinal);
long bitsPerValueElement = maxValueOrdinal == 0 ? 1 : 64 - Long.numberOfLeadingZeros(maxValueOrdinal);
long bitsPerMapSizeValue = 64 - Long.numberOfLeadingZeros(maxMapSize);
long bitsPerMapPointer = 64 - Long.numberOfLeadingZeros(totalOfMapBuckets);

Expand Down

0 comments on commit dd3d1ab

Please sign in to comment.