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

2023-01-06 Thread Alan Bateman
On Thu, 5 Jan 2023 12:18:58 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 API

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

2023-01-05 Thread Raffaello Giulietti
On Thu, 5 Jan 2023 12:18:58 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 API

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

2023-01-05 Thread Uwe Schindler
On Thu, 5 Jan 2023 12:18:58 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 API

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

2023-01-05 Thread Uwe Schindler
On Thu, 5 Jan 2023 12:50:25 GMT, Raffaello Giulietti wrote: > One reason is that if the `byte[]` contains a non-canonical NaN then `get()` > would return it. The original code first reads an integer value and then > converts it to a floating-point value, so for backward compatibility the same

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

2023-01-05 Thread Uwe Schindler
On Thu, 5 Jan 2023 12:18:58 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 API

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

2023-01-05 Thread Raffaello Giulietti
On Thu, 5 Jan 2023 12:18:58 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 API

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

2023-01-05 Thread Uwe Schindler
On Thu, 5 Jan 2023 12:18:58 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 API

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

2023-01-05 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` > improvem