(array) Increase LongArray on-heap alignment to 16 bytes

This primarily affects benchmarks, making performance more consistent for the 128 bit operations, as the system mostly works with memory mapped data.
This commit is contained in:
Viktor Lofgren 2024-05-16 19:12:36 +02:00
parent 9d7616317e
commit 48aff52e00
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ public class SegmentLongArray implements PartitionPage, LongArray {
}
public static SegmentLongArray onHeap(Arena arena, long size) {
return new SegmentLongArray(arena.allocate(WORD_SIZE*size, 8), arena);
return new SegmentLongArray(arena.allocate(WORD_SIZE*size, 16), arena);
}
public static SegmentLongArray fromMmapReadOnly(Arena arena, Path file, long offset, long size) throws IOException {

View File

@ -52,7 +52,7 @@ public class UnsafeLongArray implements PartitionPage, LongArray {
}
public static UnsafeLongArray onHeap(Arena arena, long size) {
return new UnsafeLongArray(arena.allocate(WORD_SIZE*size, 8), arena);
return new UnsafeLongArray(arena.allocate(WORD_SIZE*size, 16), arena);
}
public static UnsafeLongArray fromMmapReadOnly(Arena arena, Path file, long offset, long size) throws IOException {