[foreign-memaccess] [Rev 01] RFR: Add MemorySegment::mismatch

Chris Hegarty chegar at openjdk.java.net
Wed May 20 17:36:25 UTC 2020


On Wed, 20 May 2020 14:26:24 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Chris Hegarty has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Move implementation into vectorizedMismatchLarge, and address other review comments.
>
> test/jdk/java/foreign/TestMismatch.java line 99:
> 
>> 98:         }
>> 99:     }
>> 100:
> 
> How important is it that these tests operate on slices? Looking at the test code, it could have worked equally well if
> the input parameters were just two sizes, and then you did an explicit allocation (or maybe also receive a segment
> factory from the provider, so that you can test different segment kinds).

Originally I had a version of the test that did compare specific segments, but it didn't scale well to different sizes
and kinds ( we need to test both above and below the 8 byte threshold ). I removed a number of slice sizes, which
greatly reduces the combinations. This may be enough, or I can certainly revisit the test's structure.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/180


More information about the panama-dev mailing list