Re: RFR: 8282664: Unroll by hand StringUTF16, StringLatin1, and Arrays polynomial hash loops [v12]

2022-05-11 Thread John R Rose
On Tue, 10 May 2022 14:46:56 GMT, Ludovic Henry wrote: >> Despite the hash value being cached for Strings, computing the hash still >> represents a significant CPU usage for applications handling lots of text. >> >> Even though it would be generally better to do it through an enhancement to

Re: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v2]

2022-05-11 Thread John R Rose
On Tue, 10 May 2022 09:07:44 GMT, Adam Sotona wrote: >> Please review this patch adding new lint option, **lossy-conversions**, to >> javac to warn about type casts in compound assignments with possible lossy >> conversions. >> >> The new lint warning is shown if the type of the right-hand

Re: RFR: 8284050: [vectorapi] Optimize masked store for non-predicated architectures [v2]

2022-05-04 Thread John R Rose
On Thu, 5 May 2022 02:09:39 GMT, Xiaohong Gong wrote: >> Currently the vectorization of masked vector store is implemented by the >> masked store instruction only on architectures that support the predicate >> feature. The compiler will fall back to the java scalar code for >> non-predicate

Re: RFR: 8285633: Take better advantage of generic MethodType cache [v2]

2022-04-27 Thread John R Rose
On Tue, 26 Apr 2022 20:47:39 GMT, Claes Redestad wrote: >> The `MethodType.genericMethodType` methods provide convenience methods for >> certain common method types and also provide `@Stable` cache that allows for >> constant folding. This patch enhances the more generic `methodType` methods

Re: RFR: 8283892: Compress and expand bits

2022-04-06 Thread John R Rose
On Tue, 5 Apr 2022 22:05:19 GMT, Paul Sandoz wrote: > Add support to compress bits and expand bits of `int` and `long` values, see > Hacker's Delight (2nd edition), section 7.4. > > Compressing or expanding bits of an `int` or `long` value can be composed to > enable general permutations, and

Re: RFR: JDK-8282798 java.lang.runtime.Carrier

2022-03-08 Thread John R Rose
On Tue, 8 Mar 2022 15:59:59 GMT, Maurizio Cimadamore wrote: >> We propose to provide a runtime anonymous carrier class object generator; >> java.lang.runtime.Carrier. This generator class is designed to share >> anonymous classes when shapes are similar. For example, if several clients >>

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline

2022-02-28 Thread John R Rose
On Sat, 19 Feb 2022 05:51:52 GMT, Quan Anh Mai wrote: > Hi, > > `Objects.requireNonNull` may fail to be inlined. The call is expensive and > may lead to objects escaping to the heap while the null check is cheap and is > often elided. I have observed this when using the vector API when a call

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null

2022-02-14 Thread John R Rose
On Mon, 14 Feb 2022 18:10:37 GMT, Alan Bateman wrote: >> `MethodHandles::publicLookup` can be called instead to get a public Lookup >> to invoke a method with a Lookup parameter. The dilemma here is whether >> the API should be made null-caller friendly or using a proper API >>

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null

2022-02-14 Thread John R Rose
On Fri, 11 Feb 2022 20:32:46 GMT, Tim Prinzing wrote: > JDK-8281003 - MethodHandles::lookup throws NPE if caller is null Marked as reviewed by jrose (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7447

Re: RFR: 8281294: [vectorapi] FIRST_NONZERO reduction operation throws IllegalArgumentExcept on zero vectors

2022-02-09 Thread John R Rose
On Wed, 9 Feb 2022 21:36:01 GMT, Paul Sandoz wrote: > …ArgumentExcept on zero vectors > > This PR fixes issues for reduction using FIRST_NONZERO and adds tests. The > testing infrastructure is generalized to reduction functions and tests for > min/max reductions are updated to use that.

Re: RFR: 8281294: [vectorapi] FIRST_NONZERO reduction operation throws IllegalArgumentExcept on zero vectors

2022-02-09 Thread John R Rose
On Wed, 9 Feb 2022 21:36:01 GMT, Paul Sandoz wrote: > …ArgumentExcept on zero vectors > > This PR fixes issues for reduction using FIRST_NONZERO and adds tests. The > testing infrastructure is generalized to reduction functions and tests for > min/max reductions are updated to use that. Wow

Re: RFR: 8273616: Fix trivial doc typos in the java.base module [v3]

2021-09-13 Thread John R Rose
On Mon, 13 Sep 2021 11:22:27 GMT, Pavel Rappo wrote: >> 8273616: Fix trivial doc typos in the java.base module > > Pavel Rappo has updated the pull request incrementally with one additional > commit since the last revision: > > Use "ensure" instead of "insure" Marked as reviewed by jrose

Re: RFR: 8273616: Fix trivial doc typos in the java.base module

2021-09-10 Thread John R Rose
On Fri, 10 Sep 2021 21:16:19 GMT, Pavel Rappo wrote: > 8273616: Fix trivial doc typos in the java.base module Approved, except for two changes commented above: the original "it need only force" is correct usage, and "it needs only force" is not good usage, but "it only needs to force" would

Re: RFR: 8268224: Cleanup references to "strictfp" in core lib comments

2021-06-03 Thread John R Rose
On Fri, 4 Jun 2021 01:04:39 GMT, Joe Darcy wrote: > With the right baseline this time, as noticed by John Rose, after JEP 306 > removing non-strict floating-point was integrated, a few stale references > were left to "strictfp" and "value sets" in core library comments. This > changeset

Re: RFR: 8264288: Performance issue with MethodHandle.asCollector

2021-04-01 Thread John R Rose
On Thu, 1 Apr 2021 13:25:05 GMT, Jorn Vernee wrote: > This patch speeds up MethodHandle.asCollector handles where the array type is > not Object[], as well as speeding up all collectors where the arity is > greater than 10. > > The old code is creating a collector handle by combining a set of

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v3]

2020-10-26 Thread John R Rose
On Mon, 26 Oct 2020 17:29:11 GMT, Jorn Vernee wrote: > …`dropReturn` seemed like a good choice since we already have > `dropArguments`. WRT changing to `MethodHandle::changeReturnType`... That's a very reasonable point. People might look for `dropRT` after they find `dropAs`. And `MHs` is

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v3]

2020-10-26 Thread John R Rose
On Mon, 26 Oct 2020 15:45:00 GMT, Claes Redestad wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Collapse lform get and update into single line >> >> Co-authored-by: Claes Redestad > > LGTM, pending CSR. > >

hg: jdk8/tl/jdk: 8027823: catchException combinator fails with 9 argument target

2013-11-11 Thread john . r . rose
Changeset: 9fcb07df1c92 Author:vlivanov Date: 2013-11-09 04:21 +0400 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/9fcb07df1c92 8027823: catchException combinator fails with 9 argument target Reviewed-by: jrose ! src/share/classes/java/lang/invoke/MethodHandleImpl.java +

hg: jdk8/tl/jdk: 8024635: Caching MethodType's descriptor string improves lambda linkage performance

2013-11-03 Thread john . r . rose
Changeset: adcc01f5bc93 Author:jrose Date: 2013-11-02 20:08 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/adcc01f5bc93 8024635: Caching MethodType's descriptor string improves lambda linkage performance Summary: Better interpreted and compiled performance of operations in

hg: jdk8/tl/jdk: 9 new changesets

2013-10-05 Thread john . r . rose
Changeset: 44da760eed4b Author:jrose Date: 2013-10-05 05:30 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/44da760eed4b 8024761: JSR 292 improve performance of generic invocation Summary: use a per-MH one element cache for MH.asType to speed up MH.invoke; also cache enough

hg: jdk8/tl/jdk: 8022701: Accessibility checking: InvocationTargetException is thrown instead of IllegalAccessError

2013-10-01 Thread john . r . rose
Changeset: d90928a89af5 Author:drchase Date: 2013-09-27 13:32 -0400 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/d90928a89af5 8022701: Accessibility checking: InvocationTargetException is thrown instead of IllegalAccessError Summary: Inserted code to convert specific

hg: jdk7/tl/langtools: 6979683: inconsistent interaction of reference cast with box/unbox conversions leaves out a useful case

2010-09-01 Thread john . r . rose
Changeset: d3ead6731a91 Author:jrose Date: 2010-09-01 03:19 -0700 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/d3ead6731a91 6979683: inconsistent interaction of reference cast with box/unbox conversions leaves out a useful case Summary: Allow casts which narrow and then