Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v6]

2023-06-29 Thread Uwe Schindler
On Thu, 29 Jun 2023 07:59:42 GMT, Glavo wrote: > I understand the original reason for retaining it before, but this discussion > is outdated for this PR. > > `Unsafe` does not provide `getFloatUnaligned`/`getDoubleUnaligned` and > `putFloatUnaligned`/`putDoubleUnaligned`, so we must convert fl

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v6]

2023-06-29 Thread Glavo
On Thu, 29 Jun 2023 07:41:29 GMT, Alan Bateman wrote: > You'll need to go back through the discussion in the original PRs (there was > more than one) as there was lengthy discussion this already. https://github.com/openjdk/jdk/pull/11840#discussion_r1064489163 Are you referring to this discuss

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v6]

2023-06-29 Thread Alan Bateman
On Mon, 26 Jun 2023 07:09:11 GMT, Glavo wrote: > I deleted some incorrect comments. > > The original author of these two classes misunderstood the behavior of > `intBitsToFloat` and `longBitsToDouble`. These two methods never collapse NaN > values to a "canonical" NaN value, so the comments is

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v6]

2023-06-26 Thread Glavo
On Mon, 26 Jun 2023 07:03:22 GMT, Glavo wrote: >> `ByteArray` and `ByteArrayLittleEndian` are very useful tool classes that >> can be used in many places to performance tuning. >> >> Currently they are implemented by `VarHandle`, so using them may have some >> impact on startup time. >> >> Th

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v6]

2023-06-26 Thread Glavo
> `ByteArray` and `ByteArrayLittleEndian` are very useful tool classes that can > be used in many places to performance tuning. > > Currently they are implemented by `VarHandle`, so using them may have some > impact on startup time. > > This PR reimplements them using `Unsafe`, which reduces th