On Wed, 12 Nov 2025 09:14:15 GMT, Per Minborg <[email protected]> wrote:
> Here are some examples of benchmark output (only one or two sizes are shown > for brevity): > > ``` > Benchmark (alignment) (segmentType) (size) > Mode Cnt Score Error Units > SegmentBulkHash.Array.array N/A N/A 2 > avgt 30 2.681 ± 0.137 ns/op > SegmentBulkHash.Segment.hash ALIGNED HEAP 2 > avgt 30 3.531 ± 0.343 ns/op > SegmentBulkHash.Segment.hash ALIGNED NATIVE 2 > avgt 30 5.070 ± 0.963 ns/op > SegmentBulkHash.Segment.hash UNALIGNED HEAP 2 > avgt 30 3.498 ± 0.238 ns/op > SegmentBulkHash.Segment.hash UNALIGNED NATIVE 2 > avgt 30 4.158 ± 0.154 ns/op > SegmentBulkHash.Segment.hashLoopIntInt ALIGNED HEAP 2 > avgt 30 4.470 ± 0.215 ns/op > SegmentBulkHash.Segment.hashLoopIntInt ALIGNED NATIVE 2 > avgt 30 3.906 ± 0.233 ns/op > SegmentBulkHash.Segment.hashLoopIntInt UNALIGNED HEAP 2 > avgt 30 4.531 ± 0.246 ns/op > SegmentBulkHash.Segment.hashLoopIntInt UNALIGNED NATIVE 2 > avgt 30 3.619 ± 0.095 ns/op > SegmentBulkHash.Segment.hashLoopIntLong ALIGNED HEAP 2 > avgt 30 4.226 ± 0.266 ns/op > SegmentBulkHash.Segment.hashLoopIntLong ALIGNED NATIVE 2 > avgt 30 3.223 ± 0.351 ns/op > SegmentBulkHash.Segment.hashLoopIntLong UNALIGNED HEAP 2 > avgt 30 4.125 ± 0.293 ns/op > SegmentBulkHash.Segment.hashLoopIntLong UNALIGNED NATIVE 2 > avgt 30 3.329 ± 0.221 ns/op > SegmentBulkHash.Segment.hashLoopLongLong ALIGNED HEAP 2 > avgt 30 3.603 ± 0.285 ns/op > SegmentBulkHash.Segment.hashLoopLongLong ALIGNED NATIVE 2 > avgt 30 3.048 ± 0.172 ns/op > SegmentBulkHash.Segment.hashLoopLongLong UNALIGNED HEAP 2 > avgt 30 3.666 ± 0.180 ns/op > SegmentBulkHash.Segment.hashLoopLongLong UNALIGNED NATIVE 2 > avgt 30 3.237 ± 0.257 ns/op > ``` > Interesting -- the base version is faster for heap than native. But the loop versions are the opposite. I wonder why? (the other benchmarks don't seem to have this trait) ------------- PR Comment: https://git.openjdk.org/jdk/pull/28260#issuecomment-3521960689
