Re: RFR: 8077587: BigInteger Roots [v49]

2025-07-27 Thread fabioromano1
> This PR implements nth root computation for BigIntegers using Newton method. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Minor optimization - Changes: - all: https://git.openjdk.org/jdk/pull/24898/files - new:

Re: RFR: 8077587: BigInteger Roots [v50]

2025-07-27 Thread fabioromano1
> This PR implements nth root computation for BigIntegers using Newton method. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: A zero root's shift can't be excluded - Changes: - all: https://git.openjdk.org/jdk/pull/24

Re: RFR: 8077587: BigInteger Roots [v50]

2025-07-27 Thread fabioromano1
On Sun, 27 Jul 2025 07:56:59 GMT, fabioromano1 wrote: >> This PR implements nth root computation for BigIntegers using Newton method. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision: > > A zero root's shift can't be excluded @r

Re: RFR: 8077587: BigInteger Roots [v50]

2025-07-27 Thread Thomas Zimmermann
On Sun, 27 Jul 2025 07:56:59 GMT, fabioromano1 wrote: >> This PR implements nth root computation for BigIntegers using Newton method. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision: > > A zero root's shift can't be excluded sr

Re: RFR: 8077587: BigInteger Roots [v51]

2025-07-27 Thread fabioromano1
> This PR implements nth root computation for BigIntegers using Newton method. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Minor changes - Changes: - all: https://git.openjdk.org/jdk/pull/24898/files - new: https

Re: RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v3]

2025-07-27 Thread Tatsunori Uchino
On Sun, 27 Jul 2025 15:19:13 GMT, Alan Bateman wrote: > Right now your PR is proposing to add a default method named codePointCount > to CharSequence. If it should be excluded for this time, I will push an additional commit to _remove_ it from the content in this PR. - PR Comment

Re: RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v3]

2025-07-27 Thread Tatsunori Uchino
On Sat, 26 Jul 2025 14:21:39 GMT, Jaikiran Pai wrote: > please first subscribe to that mailing list > https://mail.openjdk.org/mailman/listinfo/core-libs-dev Does this mailing list system require us to subscribe the list to post a new mail to the list? I would like to leave it at least after t

RFR: 8362893: Improve performance for MemorySegment::getString

2025-07-27 Thread Philippe Marschall
Use `JavaLangAccess::uncheckedNewStringNoRepl` in `MemorySegment::getString` to avoid byte[] allocation in the String constructor. Fall back to the old code in the case of malformed input to get replacement characters as per Javadoc API specification. The existing tests in `TestStringEncoding`

Re: RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v3]

2025-07-27 Thread Alan Bateman
On Sun, 27 Jul 2025 10:23:03 GMT, Tatsunori Uchino wrote: > No `codePointCount` methods have been added to `CharSequence` so it may be > too early for us to add one to `CharSequence`. Do you think that you should > replace `CharSequence` in the title with another class name? Can you clarify wh

String encodeUTF8 latin1 with negatives

2025-07-27 Thread Brett Okken
In String.encodeUTF8, when the coder is latin1, there is a call to StringCoding.hasNegatives to determine if any special handling is needed. If not, a clone of the val is returned. If there are negative values, it then loops, from the beginning, through all the values to handle any individual negat

Re: RFR: 8362893: Improve performance for MemorySegment::getString

2025-07-27 Thread Shaojin Wen
On Sun, 27 Jul 2025 12:36:20 GMT, Philippe Marschall wrote: > Use `JavaLangAccess::uncheckedNewStringNoRepl` in `MemorySegment::getString` > to avoid byte[] allocation in the String constructor. > > Fall back to the old code in the case of malformed input to get replacement > characters as per

Re: RFR: 8303762: Optimize vector slice operation with constant index using VPALIGNR instruction [v2]

2025-07-27 Thread Jatin Bhateja
On Fri, 25 Jul 2025 20:09:40 GMT, Jatin Bhateja wrote: >> Patch optimizes Vector. slice operation with constant index using x86 ALIGNR >> instruction. >> It also adds a new hybrid call generator to facilitate lazy intrinsification >> or else perform procedural inlining to prevent call overhead

Re: RFR: 8355177: Speed up StringBuilder::append(char[]) via Unsafe::copyMemory [v8]

2025-07-27 Thread Shaojin Wen
On Mon, 28 Jul 2025 01:06:46 GMT, Shaojin Wen wrote: >> If we want to use ARRAY_CHAR_INDEX_SCALE, it should be used as follows >> >> Unsafe.getUnsafe().copyMemory( >> ca, >> Unsafe.ARRAY_CHAR_BASE_OFFSET + (long) off * >> Unsafe.ARRAY_CHAR_INDEX_SCALE, >>

Re: RFR: 8362893: Improve performance for MemorySegment::getString

2025-07-27 Thread simon
On Sun, 27 Jul 2025 12:36:20 GMT, Philippe Marschall wrote: > Use `JavaLangAccess::uncheckedNewStringNoRepl` in `MemorySegment::getString` > to avoid byte[] allocation in the String constructor. > > Fall back to the old code in the case of malformed input to get replacement > characters as per

Re: RFR: 8355177: Speed up StringBuilder::append(char[]) via Unsafe::copyMemory [v8]

2025-07-27 Thread Shaojin Wen
On Sun, 27 Jul 2025 04:37:32 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/java/lang/StringUTF16.java line 1489: >> >>> 1487: Unsafe.ARRAY_CHAR_BASE_OFFSET + ((long) off << 1), >>> 1488: val, >>> 1489: Unsafe.ARRAY_BYTE_BASE_OFFSET + ((lon