On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote:
>> Currently, `java.io.Bits` is using explicit logic to read/write various
>> primitive types to/from byte arrays. Switching to the use of `VarHandle`
>> access would provide better performance and less code.
>>
>> Also, using a standard
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote:
>> Currently, `java.io.Bits` is using explicit logic to read/write various
>> primitive types to/from byte arrays. Switching to the use of `VarHandle`
>> access would provide better performance and less code.
>>
>> Also, using a standard
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote:
>> Currently, `java.io.Bits` is using explicit logic to read/write various
>> primitive types to/from byte arrays. Switching to the use of `VarHandle`
>> access would provide better performance and less code.
>>
>> Also, using a standard
On Mon, 9 Jan 2023 13:17:42 GMT, Raffaello Giulietti
wrote:
>> I see - thanks for the explanation - the problem is with `floatToIntBits` vs
>> `floatToRawIntBits` in the "put" operation. The get operation is ok, but
>> then having asymmetry where we use a float VH in one case (get) but not in
On Mon, 9 Jan 2023 11:07:51 GMT, Uwe Schindler wrote:
>> src/java.base/share/classes/java/io/Bits.java line 77:
>>
>>> 75: // Using Double.longBitsToDouble collapses NaN values to a
>>> single
>>> 76: // "canonical" NaN value
>>> 77: return
On Mon, 9 Jan 2023 10:33:44 GMT, Maurizio Cimadamore
wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Remove faulty test tag, improve other test tag, fix comments
>
> src/java.base/share/classes/java/io/Bits.java
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote:
>> Currently, `java.io.Bits` is using explicit logic to read/write various
>> primitive types to/from byte arrays. Switching to the use of `VarHandle`
>> access would provide better performance and less code.
>>
>> Also, using a standard
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote:
>> Currently, `java.io.Bits` is using explicit logic to read/write various
>> primitive types to/from byte arrays. Switching to the use of `VarHandle`
>> access would provide better performance and less code.
>>
>> Also, using a standard
> Currently, `java.io.Bits` is using explicit logic to read/write various
> primitive types to/from byte arrays. Switching to the use of `VarHandle`
> access would provide better performance and less code.
>
> Also, using a standard API for these conversions means future `VarHandle`
>