Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v17]

2024-09-04 Thread Chen Liang
On Wed, 4 Sep 2024 11:54:48 GMT, Claes Redestad wrote: >> Let’s not add this, because normal logic should not pay the cost for >> abnormal logic > > Agreed in principle, but not sure the cost of this quick fail-fast sanity > test would be noticeable? If we add this, we should add this before t

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v17]

2024-09-04 Thread Claes Redestad
On Wed, 4 Sep 2024 11:48:46 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/BufWriterImpl.java >> line 165: >> >>> 163: int countNonZeroAscii = JLA.countNonZeroAscii(str); >>> 164: int utflen = strlen; >>> 165: if (countNonZeroAscii !=

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v17]

2024-09-04 Thread Shaojin Wen
On Wed, 4 Sep 2024 10:59:33 GMT, Claes Redestad wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> optimize for utf16 > > src/java.base/share/classes/jdk/internal/classfile/impl/BufWriterImpl.java > line 165: > >> 16

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v17]

2024-09-04 Thread Claes Redestad
On Tue, 3 Sep 2024 16:27:58 GMT, Shaojin Wen wrote: >> Use fast path for ascii characters 1 to 127 to improve the performance of >> writing Utf8Entry to BufferWriter. > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > optimize

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v17]

2024-09-03 Thread Claes Redestad
On Tue, 3 Sep 2024 16:27:58 GMT, Shaojin Wen wrote: >> Use fast path for ascii characters 1 to 127 to improve the performance of >> writing Utf8Entry to BufferWriter. > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > optimize

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v17]

2024-09-03 Thread Shaojin Wen
On Tue, 3 Sep 2024 16:27:58 GMT, Shaojin Wen wrote: >> Use fast path for ascii characters 1 to 127 to improve the performance of >> writing Utf8Entry to BufferWriter. > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > optimize

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v17]

2024-09-03 Thread Shaojin Wen
> Use fast path for ascii characters 1 to 127 to improve the performance of > writing Utf8Entry to BufferWriter. Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: optimize for utf16 - Changes: - all: https://git.openjdk.