RFR: 8281168: Micro-optimize VarForm.getMemberName for interpreter

2022-02-02 Thread Aleksey Shipilev
I was looking for easy things to do to improve `java.lang.invoke` cold performance. One of the things is inlining `VarForm.getMemberName` a bit, so that interpreter does not have to call through `getMemberNameOrNull`. There is direct VarHandle benchmark in our corpus: $

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-02 Thread Joe Darcy
On Thu, 3 Feb 2022 05:29:51 GMT, kabutz wrote: >> BigInteger currently uses three different algorithms for multiply. The >> simple quadratic algorithm, then the slightly better Karatsuba if we exceed >> a bit count and then Toom Cook 3 once we go into the several thousands of >> bits. Since

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-02 Thread kabutz
On Thu, 3 Feb 2022 05:29:51 GMT, kabutz wrote: >> BigInteger currently uses three different algorithms for multiply. The >> simple quadratic algorithm, then the slightly better Karatsuba if we exceed >> a bit count and then Toom Cook 3 once we go into the several thousands of >> bits. Since

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-02 Thread kabutz
> BigInteger currently uses three different algorithms for multiply. The simple > quadratic algorithm, then the slightly better Karatsuba if we exceed a bit > count and then Toom Cook 3 once we go into the several thousands of bits. > Since Toom Cook 3 is a recursive algorithm, it is trivial to

Re: RFR: 8278753: Runtime crashes with access violation during JNI_CreateJavaVM call

2022-02-02 Thread Yumin Qi
On Tue, 25 Jan 2022 00:20:19 GMT, Yumin Qi wrote: > Please review, > When jlink with --compress=2, zip is used to compress the files while doing > copy. The user case failed to load zip.dll, since zip.dll is not set in PATH. > This failure is after we get NULL from

Integrated: 8266974: duplicate property key in java.sql.rowset resource bundle

2022-02-02 Thread Masanori Yano
On Tue, 25 Jan 2022 10:47:41 GMT, Masanori Yano wrote: > I have removed the duplicate property keys. > Could you please review the fix? This pull request has now been integrated. Changeset: e3d5c9e7 Author:Masanori Yano Committer: Lance Andersen URL:

Re: Constant methods in Java

2022-02-02 Thread Aaron Scott-Boddendijk
There's this, and the fact that it's effectively unenforceable. String t = ((Supplier) () -> { final String s = myMethod(); return s; }).get(); So you keep the compiler happy but the desire to force only final retention of the reference (which, like Raffaello, I don't understand the

Re: Constant methods in Java

2022-02-02 Thread Raffaello Giulietti
Hello, I don't get why the author of myMethod() would/should be interested in forcing the caller of the method to declare the variable b to be final. Stated otherwise, what is the problem addressed by this suggestion? Have you some specific case in mind? Greetings Raffaello On 2022-02-02

Constant methods in Java

2022-02-02 Thread Alberto Otero Rodríguez
I have a suggestion. I think it would be interesting creating constant methods in Java. I mean methods declared like this: public const String myMethod() { String a = "a"; a = a + "b"; return a; } So that the response of the method is forced to be assigned to a final variable. This

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v9]

2022-02-02 Thread Joe Darcy
On Fri, 28 Jan 2022 19:03:39 GMT, kabutz wrote: >> kabutz has updated the pull request incrementally with one additional commit >> since the last revision: >> >> Benchmark for testing the effectiveness of BigInteger.parallelMultiply() > > I have added a benchmark for checking performance

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v9]

2022-02-02 Thread Paul Sandoz
On Fri, 28 Jan 2022 19:03:39 GMT, kabutz wrote: >> kabutz has updated the pull request incrementally with one additional commit >> since the last revision: >> >> Benchmark for testing the effectiveness of BigInteger.parallelMultiply() > > I have added a benchmark for checking performance

Re: RFR: 8279917: Refactor subclassAudits in Thread to use ClassValue [v2]

2022-02-02 Thread Roman Kennke
On Thu, 13 Jan 2022 12:19:03 GMT, Roman Kennke wrote: >> Thread.java would benefit from a refactoring similar to JDK-8278065 to use >> ClassValue instead of the somewhat problematic WeakClassKey mechanism. >> >> Testing: >> - [x] tier1 >> - [x] tier2 >> - [x] tier3 > > Roman Kennke has

Integrated: 8279917: Refactor subclassAudits in Thread to use ClassValue

2022-02-02 Thread Roman Kennke
On Wed, 12 Jan 2022 19:39:29 GMT, Roman Kennke wrote: > Thread.java would benefit from a refactoring similar to JDK-8278065 to use > ClassValue instead of the somewhat problematic WeakClassKey mechanism. > > Testing: > - [x] tier1 > - [x] tier2 > - [x] tier3 This pull request has now been

Re: [crac] RFR: Ensure empty Reference Handler and Cleaners queues

2022-02-02 Thread Alan Bateman
On 01/02/2022 09:11, Anton Kozlov wrote: Cross-posting RFR from CRaC Project. The change touches Reference class, so I would be glad to receive any feedback from core-libs-dev. In CRaC project, java code participates in the preparation of the platform state that can be safely stored to the