[foreign-memaccess+abi] RFR: Improve strlen performance [v6]

Per Minborg pminborg at openjdk.org
Wed Aug 16 11:14:31 UTC 2023


On Tue, 15 Aug 2023 15:13:36 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Allow heap segments of Long and Double to use chunked len calc
>
> test/jdk/java/foreign/TestStringEncoding.java line 85:
> 
>> 83:                         assertEquals(text.byteSize(), expectedByteLength);
>> 84: 
>> 85:                         String roundTrip = text.getString(0, charset);
> 
> Why wasn't this call failing before the latest changes? Wouldn't that have caused unaligned access (as trying to read a LONG out of a byte[] heap segment) ?

The unaligned access and the use of heap segments in the tests were added at the same time.

-------------

PR Review Comment: https://git.openjdk.org/panama-foreign/pull/862#discussion_r1295738859


More information about the panama-dev mailing list