On Wed, 28 Aug 2024 10:30:26 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Switch to bit checking instead of switch statement > > test/micro/org/openjdk/bench/java/lang/foreign/TestFill.java line 87: > >> 85: public void buffer_fill() { >> 86: // Hopefully, the creation of the intermediate array will be >> optimized away. >> 87: buffer.clear().put(new byte[ELEM_SIZE]); > > I think this should use an "absolute" put with explicit offset, so that you > can avoid the clear? Otherwise it's not apple to apple... in general though, ByteBuffer doesn't have a "fill" operation. What you are testing here is fill vs. copy, which is not really apple to apple. I think it's probably better to leave BB alone here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20712#discussion_r1734418264