Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-30 Thread Roger Riggs
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

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-17 Thread RĂ©mi Forax
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

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-16 Thread Julian Waters
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

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Joe Darcy
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

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Maurizio Cimadamore
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

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Uwe Schindler
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

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Maurizio Cimadamore
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

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Alan Bateman
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

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Per Minborg
> 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` >