Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v3]

2024-06-08 Thread Shaojin Wen
On Sat, 8 Jun 2024 23:30:38 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v3]

2024-06-08 Thread Glavo
On Sun, 9 Jun 2024 01:16:49 GMT, Shaojin Wen wrote: > You are right, ByteArray and ByteArrayLittleEndian have good performance > after removing Unsafe. This is similar to the previous version of java.io.Bits Do you have evidence that `VarHandle` affects startup time? If there is good evidence

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v3]

2024-06-08 Thread Shaojin Wen
On Sat, 8 Jun 2024 23:30:38 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Shaojin Wen
On Sat, 8 Jun 2024 18:00:43 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/util/HexDigits.java line 122: >> >>> 120: * @param value to convert >>> 121: */ >>> 122: public static void putHex(byte[] buffer, int off, int i) { >> >> Should there be 2 methods - for

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v3]

2024-06-08 Thread Shaojin Wen
> After PR #16245, C2 optimizes stores into primitive arrays by combining > values ​​into larger stores. In the UUID.toString method, > ByteArrayLittleEndian can be removed, making the code more elegant and faster. Shaojin Wen has updated the pull request incrementally with one additional commi

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Bernd
On Sat, 8 Jun 2024 06:40:39 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Chen Liang
On Sat, 8 Jun 2024 15:51:13 GMT, Brett Okken wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add comments > > src/java.base/share/classes/jdk/internal/util/HexDigits.java line 117: > >> 115: >> 116: /** >> 117

Re: RFR: 8266431: Dual-Pivot Quicksort improvements (Radix sort) [v11]

2024-06-08 Thread Vladimir Yaroslavskiy
On Sun, 22 Oct 2023 17:26:52 GMT, Laurent Bourgès wrote: >> * improved mixed insertion sort (makes whole sorting faster) >> * introduced Radix which sort shows several times boost of performance and >> has linear complexity instead of n*ln(n) >> * improved merging sort for almost sorted data >>

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Brett Okken
On Sat, 8 Jun 2024 06:40:39 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Brett Okken
On Sat, 8 Jun 2024 06:40:39 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Glavo
On Sat, 8 Jun 2024 06:40:39 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Chen Liang
On Sat, 8 Jun 2024 06:40:39 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Chen Liang
On Sat, 8 Jun 2024 06:40:39 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Shaojin Wen
On Sat, 8 Jun 2024 06:40:39 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Chen Liang
On Sat, 8 Jun 2024 12:25:54 GMT, Sunmisc Unsafe wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add comments > > As far as I know, ByteArrayLittleEndian uses the VarHandle mechanism, which > more efficiently writes

Re: RFR: 8333793: Improve BootstrapMethodInvoker for ConstantBootstraps and ProxyGenerator [v2]

2024-06-08 Thread Chen Liang
On Fri, 7 Jun 2024 18:58:36 GMT, Claes Redestad wrote: >> This PR refactors type matching in BootstrapMethodInvoker and adds a few >> types, seeking to improve bootstrap overheads of some ConstantBootstraps and >> in particular the ProxyGenerator condys generated for e.g. annotation >> proxies

Integrated: 8333749: Consolidate ConstantDesc conversion in java.base

2024-06-08 Thread Chen Liang
On Thu, 6 Jun 2024 18:35:01 GMT, Chen Liang wrote: > In java.base, especially in bytecode generators, we have many different > methods converting known valid Class and MethodType into ClassDesc and > MethodTypeDesc. These conversions should be consolidated into the same > utility method for th

Re: RFR: 8333793: Improve BootstrapMethodInvoker for ConstantBootstraps and ProxyGenerator [v2]

2024-06-08 Thread Claes Redestad
On Fri, 7 Jun 2024 19:22:43 GMT, Chen Liang wrote: >> It's not the intent of this PR to exhaustively enumerate all methods in >> `ConstantBootstraps`, primarily those shown to be bootstrap sensitive in >> some app. I've so far never seen a use of `primitiveClass` (and I admit >> being ignorant

Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Sunmisc Unsafe
On Sat, 8 Jun 2024 06:40:39 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has u