Re: RFR: 8338017: Add AOT command-line flag aliases [v7]

2024-10-13 Thread Ioi Lam
> This is the 1st PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > Add the following command-line options as specified in JEP 483: > > > - `-XX:AOTMode=off/record/create/auto/on` > - `-XX:AOTConfiguration=.aotconfig` > - `-XX:AOTCache=.

Re: RFR: 8339637: (tz) Update Timezone Data to 2024b [v4]

2024-10-13 Thread Johny Jose
> Timezone data 2024b changes Johny Jose has updated the pull request incrementally with one additional commit since the last revision: Review changes - Changes: - all: https://git.openjdk.org/jdk/pull/21265/files - new: https://git.openjdk.org/jdk/pull/21265/files/b3a092c3..

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v44]

2024-10-13 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Added mathematical comments for maxPowsOf5 - Changes: - all: https://g

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat [v4]

2024-10-13 Thread Ioi Lam
> This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > This PR implements the AOT-linking of invokedynamic callsites: > - We only link lambda expressions (`LambdaMetafactory::metafactory`) and > string concat (`Stri

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread Raffaello Giulietti
On Sun, 13 Oct 2024 16:57:33 GMT, fabioromano1 wrote: >> It can be proven by considering >> >> - the inequality | b * LOG_5_OF_2 - b log5(2) | < 2^(-21) >> - the properties of round() (to an integer) >> - log5(2) < 1/2 >> >> The last one is crucial for the upper bound to be m + 1 rather than m

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v9]

2024-10-13 Thread Erik Österlund
On Wed, 9 Oct 2024 08:44:34 GMT, Aleksey Shipilev wrote: >> [JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native >> method for `Reference.clear`. The original patch skipped intrinsification of >> this method, because we thought `Reference.clear` is not on a performance >

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread j3graham
On Sun, 13 Oct 2024 17:48:15 GMT, j3graham wrote: >> src/java.base/share/classes/java/math/BigDecimal.java line 5234: >> >>> 5232: */ >>> 5233: private static BigInteger fiveToTwoToThe(int n) { >>> 5234: int i = Math.min(n, FIVE_TO_2_TO.length - 1); >> >> BigInteger has “getRad

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread j3graham
On Sun, 13 Oct 2024 14:39:32 GMT, j3graham wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor change > > src/java.base/share/classes/java/math/BigDecimal.java line 5234: > >> 5232: */ >> 5233: private

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread fabioromano1
On Sun, 13 Oct 2024 16:34:09 GMT, Raffaello Giulietti wrote: >>> What's really crucial for _correctness_ is to ensure maxPowsOf5 >= k. >> >> Yes, I meant that the only way we know to ensure that condition is to ensure >> `m <= maxPowsOf5`... >> >>> Perhaps leave m <= maxPowsOf5 <= m + 1 and m

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread Raffaello Giulietti
On Sun, 13 Oct 2024 16:18:03 GMT, fabioromano1 wrote: >> Perhaps leave m <= maxPowsOf5 <= m + 1 and maxPowsOf5 >= k and drop the note >> "and is never off by more than 1 from the theoretical m" > >> What's really crucial for _correctness_ is to ensure maxPowsOf5 >= k. > > Yes, I meant that the

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread fabioromano1
On Sun, 13 Oct 2024 16:06:34 GMT, Raffaello Giulietti wrote: >> What's really crucial for _correctness_ is to ensure maxPowsOf5 >= k. >> >> But for performance you also want maxPowsOf5 to be as small as possible. So, >> the fact that it turns out that maxPowsOf5 <= m + 1 guarantees that >> ma

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread Raffaello Giulietti
On Sun, 13 Oct 2024 16:03:09 GMT, Raffaello Giulietti wrote: >> @rgiulietti Good, but I would not put the inequality `maxPowsOf5 <= m + 1` >> and say that `maxPowsOf5` is never off by more than 1 from the theoretical >> `m`, because it is not crucial as `m <= maxPowsOf5`, and because `m` is in

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread Raffaello Giulietti
On Sun, 13 Oct 2024 15:40:27 GMT, fabioromano1 wrote: >> src/java.base/share/classes/java/math/BigDecimal.java line 5270: >> >>> 5268: >>> 5269: intVal = intVal.shiftRight(powsOf2); // remove powers of 2 >>> 5270: // maxPowsOf5 >= floor(log5(intVal)) >= max{n : (intVal % >>> 5^

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v43]

2024-10-13 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Use log5(2) best approximation Co-authored-by: Raffaello Giulietti

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread fabioromano1
On Sun, 13 Oct 2024 13:13:30 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor change > > src/java.base/share/classes/java/math/BigDecimal.java line 5270: > >> 5268: >> 5269:

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread Raffaello Giulietti
On Sun, 13 Oct 2024 14:39:32 GMT, j3graham wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor change > > src/java.base/share/classes/java/math/BigDecimal.java line 5234: > >> 5232: */ >> 5233: private

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread fabioromano1
On Sun, 13 Oct 2024 14:39:32 GMT, j3graham wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor change > > src/java.base/share/classes/java/math/BigDecimal.java line 5234: > >> 5232: */ >> 5233: private

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread j3graham
On Sat, 12 Oct 2024 17:37:25 GMT, fabioromano1 wrote: >> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses >> repeated squares trick. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision: > > Minor change src/j

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v42]

2024-10-13 Thread Raffaello Giulietti
On Sat, 12 Oct 2024 17:37:25 GMT, fabioromano1 wrote: >> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses >> repeated squares trick. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision: > > Minor change After

Re: RFR: 8338023: Support two vector selectFrom API [v17]

2024-10-13 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v24]

2024-10-13 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new vector operators. > > > . SUADD : Saturating unsigned addition. > . SADD: Saturating signed addition. > . SUSUB : Saturating unsigned subtraction. > . SSUB

Withdrawn: 8341957: Add test for URLClassLoader loading invalid class with mismatching CRC32

2024-10-13 Thread Eirik Bjørsnøs
On Fri, 11 Oct 2024 11:46:40 GMT, Eirik Bjørsnøs wrote: > Please review this PR which adds test coverage for the case where > `URLClassLoader.defineClass` fails with a `ClassFormatError` _and_ the CRC32 > checksum of the class file byte array did not match the CRC32 value stated in > the JAR f

Re: RFR: 8341957: Add test for URLClassLoader loading invalid class with mismatching CRC32

2024-10-13 Thread Eirik Bjørsnøs
On Sun, 13 Oct 2024 07:07:52 GMT, Jaikiran Pai wrote: > .. is merely an implementation detail (which should be free to change any > time). I think asserting this internal detail through a test case isn't > necessary. Thanks Jai. Sure, this test asserts invariants of the implementation, not in

Re: RFR: 8341957: Add test for URLClassLoader loading invalid class with mismatching CRC32

2024-10-13 Thread Jaikiran Pai
On Fri, 11 Oct 2024 11:46:40 GMT, Eirik Bjørsnøs wrote: > Please review this PR which adds test coverage for the case where > `URLClassLoader.defineClass` fails with a `ClassFormatError` _and_ the CRC32 > checksum of the class file byte array did not match the CRC32 value stated in > the JAR f