Re: RFR: 8349400: Improve startup speed via eliminating nested classes [v2]

2025-05-22 Thread Shaojin Wen
On Mon, 14 Apr 2025 14:40:02 GMT, Roger Riggs wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> from @valeriepeng > > Looks ok; but will need to be re-opened. It would seem odd to app

Re: RFR: 8357268: Use JavaNioAccess.getBufferAddress rather than DirectBuffer.address() [v5]

2025-05-20 Thread Shaojin Wen
On Tue, 20 May 2025 16:10:07 GMT, Per Minborg wrote: >> This PR proposes to use `JavaNioAccess::getBufferAdress` rather than >> `DirectBuffer::address` so that `Buffer` instances backed by MemorySegment >> instances can be used in classes that were not covered by >> https://github.com/openjdk

Re: RFR: 8357268: Use JavaNioAccess.getBufferAddress rather than DirectBuffer.address() [v5]

2025-05-20 Thread Shaojin Wen
On Tue, 20 May 2025 16:10:07 GMT, Per Minborg wrote: >> This PR proposes to use `JavaNioAccess::getBufferAdress` rather than >> `DirectBuffer::address` so that `Buffer` instances backed by MemorySegment >> instances can be used in classes that were not covered by >> https://github.com/openjdk

Re: RFR: 8349400: Improve startup speed via eliminating nested classes [v2]

2025-04-04 Thread Shaojin Wen
ecurity.util.KnownOIDs$7 > [0.669s][info][class,load] sun.security.util.KnownOIDs$8 > [0.669s][info][class,load] sun.security.util.KnownOIDs$9 > [0.669s][info][class,load] sun.security.util.KnownOIDs$10 Shaojin Wen has updated the pull request incrementally with one additional

Re: RFR: 8349400: Improve startup speed via eliminating nested classes

2025-02-08 Thread Shaojin Wen
On Fri, 7 Feb 2025 01:46:03 GMT, Valerie Peng wrote: > > The reproducer you provided doesn't try to load KnownOIDs on my machine. > > What am I missing? > > Other than that, the change looks reasonable to me. > > Me neither and I'm using linux. Are you sure the Startup.java is right? Just > cu

Re: RFR: 8349400: Improve startup speed via eliminating nested classes

2025-02-08 Thread Shaojin Wen
On Thu, 6 Feb 2025 23:45:57 GMT, Johannes Graham wrote: >> you are right, but accessing static field from enum constructor is not >> allowed > > You could define the static field on another class, like SecurityConstants, > and then use it in the enum constructor. Creating a new empty string ar

Re: RFR: 8349400: Improve startup speed via eliminating nested classes

2025-02-05 Thread Shaojin Wen
On Wed, 5 Feb 2025 12:26:17 GMT, Daniel Jeliński wrote: > The reproducer you provided doesn't try to load KnownOIDs on my machine. What > am I missing? > > Other than that, the change looks reasonable to me. Sorry, maybe I am wrong. My test above is using build/macosx-aarch64-server-release/j

Re: RFR: 8349400: Improve startup speed via eliminating nested classes

2025-02-05 Thread Shaojin Wen
On Wed, 5 Feb 2025 15:21:59 GMT, Roger Riggs wrote: >> During JVM startup, the class KnownOIDs is loaded. KnownOIDs has 10 >> anonymous classes, which slows down the startup. This PR is to improve >> KnownOIDs and eliminate unnecessary embedded classes. >> >> >> Here's how to reproduce this:

RFR: 8349400: Improve startup speed via eliminating nested classes

2025-02-04 Thread Shaojin Wen
During JVM startup, the class KnownOIDs is loaded. KnownOIDs has 10 anonymous classes, which slows down the startup. This PR is to improve KnownOIDs and eliminate unnecessary embedded classes. Here's how to reproduce this: public class Startup { public static void main(String[] args) {} }

RFR: 8342650: Move getChars to DecimalDigits

2024-11-11 Thread Shaojin Wen
This PR is a resubmission after PR #21593 was rolled back, and the unsafe offset overflow issue has been fixed. Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to reduce duplication HexDigits and OctalDigits also include getCharsLatin1 and getCharsUTF16 Putting these two

Integrated: 8343925: [BACKOUT] JDK-8342650 Move getChars to DecimalDigits

2024-11-11 Thread Shaojin Wen
On Mon, 11 Nov 2024 12:34:44 GMT, Shaojin Wen wrote: > 8343925 Feedback PR #21593 test/jdk/java/util/BitSet/HugeToString.java crash, > > I can't reproduce the problem on a MacBook M1 Max, but I agree that more > testing is needed, so let's roll it back first. This pul

Re: RFR: 8343925: [BACKOUT] JDK-8342650 Move getChars to DecimalDigits

2024-11-11 Thread Shaojin Wen
On Mon, 11 Nov 2024 12:34:44 GMT, Shaojin Wen wrote: > 8343925 Feedback PR #21593 test/jdk/java/util/BitSet/HugeToString.java crash, > > I can't reproduce the problem on a MacBook M1 Max, but I agree that more > testing is needed, so let's roll it back first. It has be

RFR: 8343925: Test HugeToString.java crashes at java.util.BitSet.toString()Ljava/lang/String

2024-11-11 Thread Shaojin Wen
8343925 Feedback PR #21593 test/jdk/java/util/BitSet/HugeToString.java crash, so submit this PR to roll back - Commit messages: - Revert "8342650: Move getChars to DecimalDigits" Changes: https://git.openjdk.org/jdk/pull/22012/files Webrev: https://webrevs.openjdk.org/?repo=jdk&p

Re: RFR: 8342650: Move getChars to DecimalDigits

2024-10-20 Thread Shaojin Wen
On Sun, 20 Oct 2024 17:33:09 GMT, j3graham wrote: >> Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to >> reduce duplication >> >> 1. HexDigits and OctalDigits also include getCharsLatin1 and getCharsUTF16 >> 2. Putting these two methods into DecimalDigits can avoid the

RFR: 8342650: Move getChars to DecimalDigits

2024-10-20 Thread Shaojin Wen
Move getChars methods of StringLatin1 and StringUTF16 to DecimalDigits to reduce duplication 1. HexDigits and OctalDigits also include getCharsLatin1 and getCharsUTF16 2. Putting these two methods into DecimalDigits can avoid the need to expose them in JavaLangAccess 3. Eliminate duplicate code

RFR: 8338937: Optimize the string concatenation of ClassDesc

2024-08-25 Thread Shaojin Wen
Optimize ClassDesc related string concatenation, which will reduce object allocation during startup. - Commit messages: - Optimize the string concatenation related to ClassDesc during startup Changes: https://git.openjdk.org/jdk/pull/20705/files Webrev: https://webrevs.openjdk.or

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v5]

2024-07-27 Thread Shaojin Wen
#print > method. > > ## 3. String.format directly calls j.u.Formatter > String.format directly calls j.u.Formatter via SharedSecrets to improve > performance Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The pull request now con

RFR: 8336856: Optimize String Concat

2024-07-21 Thread Shaojin Wen
The current implementation of StringConcat is to mix the coder and length into a long. This operation will have some overhead for int/long/boolean types. We can separate the calculation of the coder from the calculation of the length, which can improve the performance in the scenario of concat i

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v4]

2024-07-19 Thread Shaojin Wen
On Sat, 6 Jul 2024 00:15:04 GMT, Shaojin Wen wrote: >> String.format is widely used, and improving its performance is very >> meaningful. This PR can significantly improve the performance of >> String.format. Sorry, there are many changes, which will take a lot of time.

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v4]

2024-07-05 Thread Shaojin Wen
On Sat, 6 Jul 2024 00:15:04 GMT, Shaojin Wen wrote: >> String.format is widely used, and improving its performance is very >> meaningful. This PR can significantly improve the performance of >> String.format. Sorry, there are many changes, which will take a lot of time.

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v4]

2024-07-05 Thread Shaojin Wen
#print > method. > > ## 3. String.format directly calls j.u.Formatter > String.format directly calls j.u.Formatter via SharedSecrets to improve > performance Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: Implementi

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v3]

2024-07-05 Thread Shaojin Wen
On Fri, 5 Jul 2024 20:43:51 GMT, Shaojin Wen wrote: >> String.format is widely used, and improving its performance is very >> meaningful. This PR can significantly improve the performance of >> String.format. Sorry, there are many changes, which will take a lot of time.

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v3]

2024-07-05 Thread Shaojin Wen
#print > method. > > ## 3. String.format directly calls j.u.Formatter > String.format directly calls j.u.Formatter via SharedSecrets to improve > performance Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excl

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v2]

2024-07-05 Thread Shaojin Wen
On Fri, 5 Jul 2024 18:56:58 GMT, Chen Liang wrote: >> Shaojin Wen has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - use unknownFormatConversion method construct >> UnknownFormatConversionException >

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v2]

2024-07-05 Thread Shaojin Wen
#print > method. > > ## 3. String.format directly calls j.u.Formatter > String.format directly calls j.u.Formatter via SharedSecrets to improve > performance Shaojin Wen has updated the pull request incrementally with four additional commits since the last revision: - use unkno

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format

2024-07-05 Thread Shaojin Wen
On Fri, 5 Jul 2024 15:40:24 GMT, Shaojin Wen wrote: > String.format is widely used, and improving its performance is very > meaningful. This PR can significantly improve the performance of > String.format. Sorry, there are many changes, which will take a lot of time. > I hope yo

RFR: 8335791: Speed ​​up j.u.Formatter & String.format

2024-07-05 Thread Shaojin Wen
String.format is widely used, and improving its performance is very meaningful. This PR can significantly improve the performance of String.format. Sorry, there are many changes, which will take a lot of time. I hope you can review it patiently. Improved performance includes the following: ##

Withdrawn: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException

2023-10-20 Thread Shaojin Wen
On Mon, 16 Oct 2023 22:27:34 GMT, Shaojin Wen wrote: > When calling String::newStringNoRepl and String::getBytesNoRepl, we need to > use try...catch to handle CharacterCodingException and throw > IllegalArgumentException instead of CharacterCodingException to make the > calling

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v4]

2023-10-17 Thread Shaojin Wen
On Tue, 17 Oct 2023 14:09:08 GMT, Raffaello Giulietti wrote: > @wenshao The proposal changes the exception types for seemingly no reason. > What concrete problem does this enhancement PR address? @lianch 's suggestion in PR #14812 : "Make the NoRepl methods throw IllegalArgument (like NoRepl1

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v5]

2023-10-17 Thread Shaojin Wen
> When calling String::newStringNoRepl and String::getBytesNoRepl, we need to > use try...catch to handle CharacterCodingException and throw > IllegalArgumentException instead of CharacterCodingException to make the > calling code cleaner. Shaojin Wen has updated the pull request i

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v4]

2023-10-17 Thread Shaojin Wen
> When calling String::newStringNoRepl and String::getBytesNoRepl, we need to > use try...catch to handle CharacterCodingException and throw > IllegalArgumentException instead of CharacterCodingException to make the > calling code cleaner. Shaojin Wen has updated the pull request i

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v3]

2023-10-17 Thread Shaojin Wen
> When calling String::newStringNoRepl and String::getBytesNoRepl, we need to > use try...catch to handle CharacterCodingException and throw > IllegalArgumentException instead of CharacterCodingException to make the > calling code cleaner. Shaojin Wen has updated the pull request i

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v2]

2023-10-16 Thread Shaojin Wen
> When calling String::newStringNoRepl and String::getBytesNoRepl, we need to > use try...catch to handle CharacterCodingException and throw > IllegalArgumentException instead of CharacterCodingException to make the > calling code cleaner. Shaojin Wen has updated the pull request i

RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException

2023-10-16 Thread Shaojin Wen
When calling String::newStringNoRepl and String::getBytesNoRepl, we need to use try...catch to handle CharacterCodingException and throw IllegalArgumentException instead of CharacterCodingException to make the calling code cleaner. - Commit messages: - Make the NoRepl methods thro