mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +00:00
(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:
parent
9d7616317e
commit
48aff52e00
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user