-
Bug
-
Resolution: Fixed
-
P3
-
17, 18, repo-panama
-
b30
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8269780 | 18 | Roland Westrelin | P3 | Resolved | Fixed | b05 |
JDK-8270692 | 17.0.1 | Roland Westrelin | P3 | Resolved | Fixed | b03 |
The attached benchmark has interesting results:
```
Benchmark (size) Mode Cnt Score Error Units
TestLoadBytes.arrayScalar 1024 avgt 10 241.256 ? 1.028 ns/op
TestLoadBytes.arrayScalarConst 1024 avgt 10 244.251 ? 5.218 ns/op
TestLoadBytes.bufferNativeScalar 1024 avgt 10 262.128 ? 1.251 ns/op
TestLoadBytes.bufferNativeScalarConst 1024 avgt 10 250.552 ? 2.710 ns/op
TestLoadBytes.segmentNativeScalar 1024 avgt 10 722.670 ? 6.427 ns/op
TestLoadBytes.segmentNativeScalarConst 1024 avgt 10 253.419 ? 3.043 ns/op
```
Access using segment is almost 4x slower than using byte buffers. When investigating the generated compiled code, it seems like all the time is spent in the post-loop, and that the main loop (which seems to unroll correctly) is never executed.
```
Benchmark (size) Mode Cnt Score Error Units
TestLoadBytes.arrayScalar 1024 avgt 10 241.256 ? 1.028 ns/op
TestLoadBytes.arrayScalarConst 1024 avgt 10 244.251 ? 5.218 ns/op
TestLoadBytes.bufferNativeScalar 1024 avgt 10 262.128 ? 1.251 ns/op
TestLoadBytes.bufferNativeScalarConst 1024 avgt 10 250.552 ? 2.710 ns/op
TestLoadBytes.segmentNativeScalar 1024 avgt 10 722.670 ? 6.427 ns/op
TestLoadBytes.segmentNativeScalarConst 1024 avgt 10 253.419 ? 3.043 ns/op
```
Access using segment is almost 4x slower than using byte buffers. When investigating the generated compiled code, it seems like all the time is spent in the post-loop, and that the main loop (which seems to unroll correctly) is never executed.
- backported by
-
JDK-8269780 C2: main loop in micro benchmark never executed
- Resolved
-
JDK-8270692 C2: main loop in micro benchmark never executed
- Resolved
- relates to
-
JDK-8272372 Performance regression in memory access API
- Closed
-
JDK-8308660 C2 compilation hits 'node must be dead' assert
- Resolved
(1 links to)