Re: RFR: 8331940: ClassFile API ArrayIndexOutOfBoundsException with certain class files [v2]

2024-05-15 Thread Paul Sandoz
On Wed, 15 May 2024 07:51:33 GMT, Adam Sotona wrote: >> Class file with `LineNumberTable` attribute element pointing behind the >> bytecode array throws `ArrayIndexOutOfBoundsException`. >> This patch performs the check and throws expected >> `IllegalArgumentException` instead. >> Relevant

Re: RFR: 8331940: ClassFile API ArrayIndexOutOfBoundsException with certain class files

2024-05-14 Thread Paul Sandoz
On Tue, 14 May 2024 13:18:51 GMT, Adam Sotona wrote: > Class file with `LineNumberTable` attribute element pointing behind the > bytecode array throws `ArrayIndexOutOfBoundsException`. > This patch performs the check and throws expected `IllegalArgumentException` > instead. > Relevant test is

Re: RFR: 8332003: Clarify javadoc for MemoryLayout::offsetHandle [v5]

2024-05-10 Thread Paul Sandoz
On Fri, 10 May 2024 16:10:29 GMT, Maurizio Cimadamore wrote: >> Consider this layout: >> >> >> MemoryLayout SEQ = MemoryLayout.sequenceLayout(5, >> MemoryLayout.sequenceLayout(10, JAVA_INT)); >> >> >> And the corresponding offset handle: >> >> >> MethodHandle offsetHandle =

Re: RFR: 8332003: Clarify javadoc for MemoryLayout::offsetHandle [v2]

2024-05-09 Thread Paul Sandoz
On Thu, 9 May 2024 18:26:17 GMT, Maurizio Cimadamore wrote: >> Consider this layout: >> >> >> MemoryLayout SEQ = MemoryLayout.sequenceLayout(5, >> MemoryLayout.sequenceLayout(10, JAVA_INT)); >> >> >> And the corresponding offset handle: >> >> >> MethodHandle offsetHandle =

Re: RFR: 8331734: Atomic MemorySegment VarHandle operations fails for element layouts

2024-05-07 Thread Paul Sandoz
On Tue, 7 May 2024 15:42:23 GMT, Maurizio Cimadamore wrote: > This PR fixes an issue that has crept into the FFM API implementation. > > From very early stages, the FFM API used to disable the alignment check on > nested layout elements, in favor of an alignment check against the memory >

Re: RFR: 8048691: Spliterator.SORTED characteristics gets cleared for BaseStream.spliterator

2024-05-07 Thread Paul Sandoz
On Tue, 7 May 2024 14:58:00 GMT, Viktor Klang wrote: > Removes SORTED if not also ORDERED for escape-hatch `Stream::spliterator()` Marked as reviewed by psandoz (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/19123#pullrequestreview-2043897612

Re: RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files [v2]

2024-05-03 Thread Paul Sandoz
On Fri, 3 May 2024 17:13:04 GMT, Adam Sotona wrote: >> Specifically corrupted constant pool of a class file can cause >> ClassCastException, when the entries are accessed by Class-File API in exact >> order. >> >> This fix avoids the ClassCastException and throws ConstantPoolException >>

Re: RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files

2024-05-03 Thread Paul Sandoz
On Fri, 3 May 2024 15:28:05 GMT, Adam Sotona wrote: > Specifically corrupted constant pool of a class file can cause > ClassCastException, when the entries are accessed by Class-File API in exact > order. > > This fix avoids the ClassCastException and throws ConstantPoolException > instead.

Re: RFR: 8331320: ClassFile API OutOfMemoryError with certain class files [v2]

2024-05-02 Thread Paul Sandoz
On Thu, 2 May 2024 11:13:22 GMT, Adam Sotona wrote: >> Class files with specifically corrupted tableswitch or lookupswitch >> instructions in the bytecode cause OutOfMemoryError while parsing with >> Class-File API. >> This patch performs additional checks to avoid OOME and adds relevant

Re: RFR: 8331320: ClassFile API OutOfMemoryError with certain class files

2024-04-30 Thread Paul Sandoz
On Tue, 30 Apr 2024 15:31:02 GMT, Adam Sotona wrote: > Class files with specifically corrupted tableswitch or lookupswitch > instructions in the bytecode cause OutOfMemoryError while parsing with > Class-File API. > This patch performs additional checks to avoid OOME and adds relevant tests. >

Re: RFR: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes [v3]

2024-04-26 Thread Paul Sandoz
On Fri, 26 Apr 2024 13:34:08 GMT, Adam Sotona wrote: >> ClassFile API dives into the nested constant pool entries without type >> restrictions, while parsing a class file. Validation of the entry is >> performed post-parsing. Specifically corrupted constant pool entry may cause >> infinite

Re: RFR: 8322847: java.lang.classfile.BufWriter should specify @throws for its writeXXX methods

2024-04-25 Thread Paul Sandoz
On Tue, 23 Apr 2024 11:56:41 GMT, Adam Sotona wrote: > This patch adds missing `@throws` javadoc annotations to > `java.lang.classfile.BufWriter`. > > Please review. > > Thank you, > Adam Marked as reviewed by psandoz (Reviewer). - PR Review:

Re: RFR: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes

2024-04-25 Thread Paul Sandoz
On Thu, 25 Apr 2024 00:51:41 GMT, Adam Sotona wrote: > Unfortunately it would have to be an expected tags list or an extra > constructed bit mask, due to the multiple tags allowed for MemberRefEntry and > it would slightly affect the performance. Ah yes, i missed that. It could be two tags,

Re: RFR: 8325373: Improve StackCounter error reporting for bad switch cases

2024-04-24 Thread Paul Sandoz
On Tue, 23 Apr 2024 12:59:18 GMT, Adam Sotona wrote: > ClassFile API `StackMapGenerator` attaches print or hex dump of the method to > an error message. > However there is no such attachment when the stack maps generation is turned > off. > > This patch moves class print/dump to

Re: RFR: 8322847: java.lang.classfile.BufWriter should specify @throws for its writeXXX methods

2024-04-24 Thread Paul Sandoz
On Tue, 23 Apr 2024 11:56:41 GMT, Adam Sotona wrote: > This patch adds missing `@throws` javadoc annotations to > `java.lang.classfile.BufWriter`. > > Please review. > > Thank you, > Adam This looks good, but for completeness it will need a CSR. - PR Review:

Re: RFR: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes

2024-04-24 Thread Paul Sandoz
On Tue, 23 Apr 2024 07:39:47 GMT, Adam Sotona wrote: > ClassFile API dives into the nested constant pool entries without type > restrictions, while parsing a class file. Validation of the entry is > performed post-parsing. Specifically corrupted constant pool entry may cause > infinite loop

Re: Vector (and integer) API: unsigned min/max

2024-04-18 Thread Paul Sandoz
Hi David, It’s not at all outlandish, but would caution it's more work than one might initially think. Could you describe a little more about your use case? that can be helpful to understand the larger picture and demand. Using unsigned comparison would be my recommended approach with the

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v3]

2024-04-17 Thread Paul Sandoz
On Wed, 17 Apr 2024 16:08:31 GMT, Adam Sotona wrote: >> Current implementation of `LambdaMetafactory` does not allow to use lambdas >> in hidden classes. Invocation throws `NoClassDefFoundError` instead. >> >> This patch includes lambda implementation in a hidden class under the >> special

Re: RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v2]

2024-04-17 Thread Paul Sandoz
On Wed, 17 Apr 2024 12:51:55 GMT, Adam Sotona wrote: >> Current implementation of `LambdaMetafactory` does not allow to use lambdas >> in hidden classes. Invocation throws `NoClassDefFoundError` instead. >> >> This patch includes lambda implementation in a hidden class under the >> special

Re: RFR: 8196106: Support nested infinite or recursive flat mapped streams [v8]

2024-04-15 Thread Paul Sandoz
On Sat, 13 Apr 2024 14:27:12 GMT, Viktor Klang wrote: >> This PR implements Gatherer-inspired encoding of `flatMap` that shows that >> it is both competitive performance-wise as well as improve correctness. >> >> Below is the performance of `Stream::flatMap` (for reference types): >> >>

Re: RFR: 8196106: Support nested infinite or recursive flat mapped streams [v7]

2024-04-12 Thread Paul Sandoz
On Fri, 12 Apr 2024 14:53:01 GMT, Viktor Klang wrote: >> This PR implements Gatherer-inspired encoding of `flatMap` that shows that >> it is both competitive performance-wise as well as improve correctness. >> >> Below is the performance of `Stream::flatMap` (for reference types): >> >>

Re: RFR: 8196106: Support nested infinite or recursive flat mapped streams [v2]

2024-04-09 Thread Paul Sandoz
On Tue, 9 Apr 2024 10:07:46 GMT, Viktor Klang wrote: >> This PR implements Gatherer-inspired encoding of `flatMap` that shows that >> it is both competitive performance-wise as well as improve correctness. >> >> Below is the performance of `Stream::flatMap` (for reference types): >> >> Before

Re: RFR: 8196106: Support nested infinite or recursive flat mapped streams

2024-04-09 Thread Paul Sandoz
On Mon, 8 Apr 2024 10:20:11 GMT, Viktor Klang wrote: > @PaulSandoz @AlanBateman I've added a commit to this PR which removes the use > of Gatherer for Stream::flatMap, but instead implements flatMap for all of > the pipelines using the same encoding which Gatherer would use. It seems very >

Re: RFR: 8325659: Normalize Random usage by incubator vector tests

2024-04-08 Thread Paul Sandoz
On Mon, 8 Apr 2024 10:50:00 GMT, Evgeny Nikitin wrote: > Improve RNG usage in said tests: > > 1. The RNG is not created by our Utils class, as suggested in our JTReg tests; > 2. The seed, accordingly, is not a fixed value now, but truly random; > 3. The tests that had been creating their own

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2024-03-28 Thread Paul Sandoz
On Fri, 15 Mar 2024 13:58:05 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> Thanks >> >> This is a continuation of work based on [1] by @XiaohongGong, most work was >> done in that pr. In this new pr, just rebased the code in [1], then added >> some minor changes

Re: RFR: 8328316: Finisher cannot emit if stream is sequential and integrator returned false [v4]

2024-03-21 Thread Paul Sandoz
On Wed, 20 Mar 2024 23:58:32 GMT, Viktor Klang wrote: >> Adds differentiation between direct and transitive short circuiting which >> could prevent pushing downstream in the finisher for built-ins that were not >> `collect()`. >> >> Creating this as a draft PR for now, just need to run some

Re: RFR: 8328316: Finisher cannot emit if stream is sequential and integrator returned false

2024-03-20 Thread Paul Sandoz
On Mon, 18 Mar 2024 16:27:13 GMT, Viktor Klang wrote: > Adds differentiation between direct and transitive short circuiting which > could prevent pushing downstream in the finisher for built-ins that were not > `collect()`. > > Creating this as a draft PR for now, just need to run some

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v17]

2024-03-04 Thread Paul Sandoz
On Sat, 2 Mar 2024 16:22:22 GMT, Jatin Bhateja wrote: >> Hi All, >> >> This patch optimizes sub-word gather operation for x86 targets with AVX2 and >> AVX512 features. >> >> Following is the summary of changes:- >> >> 1) Intrinsify sub-word gather using hybrid algorithm which initially >>

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v16]

2024-02-27 Thread Paul Sandoz
On Tue, 27 Feb 2024 02:47:13 GMT, Jatin Bhateja wrote: >> Hi All, >> >> This patch optimizes sub-word gather operation for x86 targets with AVX2 and >> AVX512 features. >> >> Following is the summary of changes:- >> >> 1) Intrinsify sub-word gather using hybrid algorithm which initially >>

Re: [jdk22] RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-02-07 Thread Paul Sandoz
On Wed, 7 Feb 2024 09:13:33 GMT, Aleksey Shipilev wrote: > Looks fine. Thanks! - PR Comment: https://git.openjdk.org/jdk22/pull/109#issuecomment-1932769043

[jdk22] Integrated: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-02-07 Thread Paul Sandoz
On Tue, 6 Feb 2024 16:50:10 GMT, Paul Sandoz wrote: > This pull request contains a backport of commit > [1ae85138](https://github.com/openjdk/jdk/commit/1ae851387f881263ccc6aeace5afdd0f49d41d33) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit b

[jdk22] RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-02-06 Thread Paul Sandoz
This pull request contains a backport of commit [1ae85138](https://github.com/openjdk/jdk/commit/1ae851387f881263ccc6aeace5afdd0f49d41d33) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Paul Sandoz on 2 Feb 2024 and was reviewed

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v2]

2024-02-05 Thread Paul Sandoz
On Mon, 5 Feb 2024 18:31:44 GMT, Adam Sotona wrote: >> `java.lang.classfile.CodeBuilder` contains more than 230 API methods. >> Existing ClassFile API use cases proved the concept one big CodeBuilder is >> comfortable. However there are some redundancies, glitches in the naming >> conventions,

Integrated: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-02-02 Thread Paul Sandoz
On Mon, 29 Jan 2024 19:45:41 GMT, Paul Sandoz wrote: > The implementation of method `VectorSpecies::fromMemorySegment`, in > `AbstractSpecies::fromMemorySegment`, neglects to perform bounds checks on > the offset argument when the method is compiled by C2 (bounds checks are > pe

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments [v2]

2024-02-01 Thread Paul Sandoz
On Thu, 1 Feb 2024 12:22:10 GMT, Maurizio Cimadamore wrote: >> My expectation is the risk is small, but of course non-zero. These tests can >> be expensive to run so i was trying balance the risk without increasing test >> execution times. >> >> I could strengthen the comment from: >> >>

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments [v2]

2024-02-01 Thread Paul Sandoz
possible in the knowledge that it calls the vector access method (the > tests were intended to test out of bounds access when compiled by C2). > > Thinking ahead its tempting to remove the species access methods, simplifying > functionality that is duplicated. Paul Sandoz has upd

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2024-02-01 Thread Paul Sandoz
On Wed, 15 Nov 2023 22:46:03 GMT, Jorn Vernee wrote: > See the JBS issue for an extended problem description. > > This patch changes the specification and implementation of > `MethodHandles::byteArrayViewVarHandle`, > `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v11]

2024-01-31 Thread Paul Sandoz
On Wed, 31 Jan 2024 23:53:16 GMT, Sandhya Viswanathan wrote: >> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 1613: >> >>> 1611: vpand(xtmp, idx_vec, xtmp, vlen_enc); >>> 1612: // Load double words from normalized indices. >>> 1613: evpgatherdd(dst, gmask, Address(base, xtmp,

Re: RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-01-30 Thread Paul Sandoz
On Wed, 31 Jan 2024 00:10:26 GMT, Maurizio Cimadamore wrote: >> The implementation of method `VectorSpecies::fromMemorySegment`, in >> `AbstractSpecies::fromMemorySegment`, neglects to perform bounds checks on >> the offset argument when the method is compiled by C2 (bounds checks are >>

RFR: 8324858: [vectorapi] Bounds checking issues when accessing memory segments

2024-01-29 Thread Paul Sandoz
The implementation of method `VectorSpecies::fromMemorySegment`, in `AbstractSpecies::fromMemorySegment`, neglects to perform bounds checks on the offset argument when the method is compiled by C2 (bounds checks are performed when interpreted and by C1). This is an oversight and explicit

Re: RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v5]

2024-01-24 Thread Paul Sandoz
On Wed, 24 Jan 2024 18:48:34 GMT, Aleksey Shipilev wrote: >> @dholmes-ora Indeed it's a compiler magic, albeit not really weird. While >> the method execution only receives the evaluated value of `expr`, the method >> compilation has the expression in its original form. As a result, it can >>

Re: RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v5]

2024-01-23 Thread Paul Sandoz
On Tue, 23 Jan 2024 17:21:47 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch introduces `JitCompiler::isConstantExpression` which can be used >> to statically determine whether an expression has been constant-folded by >> the Jit compiler, leading to more constant-folding opportunities. For

Re: RFR: 8316641: VarHandle template classes can share code in the base class [v8]

2023-12-04 Thread Paul Sandoz
On Mon, 4 Dec 2023 14:58:34 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template >> line 594: >> >>> 592: @ForceInline >>> 593: static int indexRO(ByteBuffer bb, int index) { >>> 594: if (bb.isReadOnly()) >>

Re: RFR: 8321223: Implementation of Scoped Values (Second Preview)

2023-12-03 Thread Paul Sandoz
On Sun, 3 Dec 2023 08:46:07 GMT, Alan Bateman wrote: > This API is sitting out JDK 22, meaning no API/implementation changes in this > PR. Some small API changes are likely for JDK 23. > > For now, we just need to bump JEP number/title that shows up in the preview > section of the javadoc.

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-22 Thread Paul Sandoz
On Wed, 22 Nov 2023 09:05:31 GMT, Andrew Haley wrote: > > Have you considered the possibility of copying the sleef source to the > > OpenJDK repository and thereby it becomes part of the build process? I > > don't know how straightforward that is technically and IANAL but I think > > it's

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-22 Thread Paul Sandoz
On Wed, 22 Nov 2023 09:05:31 GMT, Andrew Haley wrote: > > Have you considered the possibility of copying the sleef source to the > > OpenJDK repository and thereby it becomes part of the build process? I > > don't know how straightforward that is technically and IANAL but I think > > it's

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-21 Thread Paul Sandoz
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-21 Thread Paul Sandoz
On Wed, 15 Nov 2023 01:32:00 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-21 Thread Paul Sandoz
On Mon, 23 Oct 2023 09:02:35 GMT, Xiaohong Gong wrote: > This looks good. As far as I can tell the choice you've made of accuracy > matches what we need to meet the spec. Same here . Sinh/cosh/tanh/expm1 are specified to be within 2.5 ulps of the exact result, but i believe sleef does not

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-21 Thread Paul Sandoz
On Mon, 23 Oct 2023 09:02:35 GMT, Xiaohong Gong wrote: > This looks good. As far as I can tell the choice you've made of accuracy > matches what we need to meet the spec. Same here . Sinh/cosh/tanh/expm1 are specified to be within 2.5 ulps of the exact result, but i believe sleef does not

Re: RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

2023-11-16 Thread Paul Sandoz
On Wed, 15 Nov 2023 22:46:03 GMT, Jorn Vernee wrote: > See the JBS issue for an extended problem description. > > This patch changes the specification and implementation of > `MethodHandles::byteArrayViewVarHandle`, > `MethodHandles::byteBufferViewVarHandle`, `ByteBuffer::alignedSlice`, and

Re: RFR: 8319123: Implement JEP 461: Stream Gatherers (Preview) [v9]

2023-11-15 Thread Paul Sandoz
On Wed, 15 Nov 2023 17:50:48 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Improvements after feedback Elegantly and

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v5]

2023-11-13 Thread Paul Sandoz
On Mon, 13 Nov 2023 09:22:13 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Minor improvements to Gatherer Javadoc

Re: RFR: 8315680: java/lang/ref/ReachabilityFenceTest.java should run with -Xbatch

2023-11-07 Thread Paul Sandoz
On Tue, 7 Nov 2023 17:45:36 GMT, Paul Sandoz wrote: >> This test requires certain methods to be compiled, but without `-Xbatch` the >> compiler races against the test code, which can lead to intermittent >> failures. > > Marked as reviewed by psandoz (Reviewer). >

Re: RFR: 8315680: java/lang/ref/ReachabilityFenceTest.java should run with -Xbatch

2023-11-07 Thread Paul Sandoz
On Tue, 3 Oct 2023 07:47:30 GMT, Gergö Barany wrote: > This test requires certain methods to be compiled, but without `-Xbatch` the > compiler races against the test code, which can lead to intermittent failures. Marked as reviewed by psandoz (Reviewer). - PR Review:

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[] [v3]

2023-10-30 Thread Paul Sandoz
On Mon, 30 Oct 2023 13:43:13 GMT, Per Minborg wrote: >> This PR proposes removing the restriction that only heap `MemorySegment` >> wrapping a `byte` array can be accessed by Vectors. Now any array type can >> be used provided the element alignment constraints are respected. > > Per Minborg

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[] [v3]

2023-10-30 Thread Paul Sandoz
On Mon, 30 Oct 2023 13:43:13 GMT, Per Minborg wrote: >> This PR proposes removing the restriction that only heap `MemorySegment` >> wrapping a `byte` array can be accessed by Vectors. Now any array type can >> be used provided the element alignment constraints are respected. > > Per Minborg

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[] [v2]

2023-10-26 Thread Paul Sandoz
On Thu, 26 Oct 2023 09:17:25 GMT, Per Minborg wrote: >> This PR proposes removing the restriction that only heap `MemorySegment` >> wrapping a `byte` array can be accessed by Vectors. Now any array type can >> be used provided the element alignment constraints are respected. > > Per Minborg

Re: RFR: 8318421 : AbstractPipeline.sourceStageSpliterator() chases pointers needlessly

2023-10-19 Thread Paul Sandoz
On Wed, 18 Oct 2023 10:14:08 GMT, Viktor Klang wrote: > Removes a few unnecessary dereferences of `sourceStage`. Marked as reviewed by psandoz (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/16241#pullrequestreview-1685995672

Re: RFR: 8318420 : AbstractPipeline invokes overridden method in constructor

2023-10-19 Thread Paul Sandoz
On Wed, 18 Oct 2023 09:45:53 GMT, Viktor Klang wrote: > This PR corrects so that `opIsStateful()` is not invoked as a part of the > java.util.stream.AbstractPipeline constructor—as `opIsStateful()` is intended > to be overridden by subclasses, and as their own constructors have not run > when

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v5]

2023-10-12 Thread Paul Sandoz
On Thu, 12 Oct 2023 03:44:28 GMT, Danny Thomas wrote: > At least on Saphire Rapids the [emulation suggested > here](https://github.com/natmaurice/x86-simd-sort/commit/41d03b2d8f3b62a2ee6a3a97a8da7f193a407026) > only imposes a 6% penalty for `intSort`, while also mitigating the > performance

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR [v5]

2023-10-12 Thread Paul Sandoz
On Thu, 12 Oct 2023 03:44:28 GMT, Danny Thomas wrote: > At least on Saphire Rapids the [emulation suggested > here](https://github.com/natmaurice/x86-simd-sort/commit/41d03b2d8f3b62a2ee6a3a97a8da7f193a407026) > only imposes a 6% penalty for `intSort`, while also mitigating the > performance

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-09 Thread Paul Sandoz
On Thu, 5 Oct 2023 23:36:48 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays. >>

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-09 Thread Paul Sandoz
On Thu, 5 Oct 2023 23:36:48 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays. >>

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-09 Thread Paul Sandoz
On Sun, 8 Oct 2023 06:18:13 GMT, Danny Thomas wrote: >> Srinivas Vamsi Parasa has updated the pull request with a new target base >> due to a merge or a rebase. The pull request now contains 45 commits: >> >> - fix code style and formatting >> - Merge branch 'master' of

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v42]

2023-10-09 Thread Paul Sandoz
On Sun, 8 Oct 2023 06:18:13 GMT, Danny Thomas wrote: >> Srinivas Vamsi Parasa has updated the pull request with a new target base >> due to a merge or a rebase. The pull request now contains 45 commits: >> >> - fix code style and formatting >> - Merge branch 'master' of

Re: RFR: 8316998: Remove redundant type arguments in the java.util.stream package [v3]

2023-09-28 Thread Paul Sandoz
On Fri, 29 Sep 2023 00:21:52 GMT, Mourad Abbay wrote: > Are you referring to the expand of lambdas and the extra whitespaces ? Yes, sometimes the IDE just does it automatically! - PR Comment: https://git.openjdk.org/jdk/pull/15936#issuecomment-1740160022

Re: RFR: 8316998: Remove redundant type arguments in the java.util.stream package [v3]

2023-09-28 Thread Paul Sandoz
On Fri, 29 Sep 2023 00:37:16 GMT, Mourad Abbay wrote: > > > Are you referring to the expand of lambdas and the extra whitespaces ? > > > > > > Yes, sometimes the IDE just does it automatically! > > Is there a way I can make the IDE respect the code style? I doubt it, since 1) there is no

Re: RFR: 8317119: Remove unused imports in the java.util.stream package [v2]

2023-09-28 Thread Paul Sandoz
On Wed, 27 Sep 2023 22:44:52 GMT, Mourad Abbay wrote: >> Remove unused imports in the java.util.stream package. > > Mourad Abbay has updated the pull request incrementally with one additional > commit since the last revision: > > Update copyright year. Marked as reviewed by psandoz

Re: RFR: 8317034: Remove redundant type cast in the java.util.stream package [v3]

2023-09-28 Thread Paul Sandoz
On Wed, 27 Sep 2023 22:47:43 GMT, Mourad Abbay wrote: >> Remove redundant type cast in the java.util.stream package. > > Mourad Abbay has updated the pull request incrementally with one additional > commit since the last revision: > > Update copyright year. Marked as reviewed by psandoz

Re: RFR: 8316998: Remove redundant type arguments in the java.util.stream package [v3]

2023-09-28 Thread Paul Sandoz
On Wed, 27 Sep 2023 22:44:07 GMT, Mourad Abbay wrote: >> Remove cases of redundant type arguments in the java.util.stream package. > > Mourad Abbay has updated the pull request incrementally with one additional > commit since the last revision: > > Update copyright year. Looks good. Note a

Re: RFR: 8317264: Pattern.Bound has `static` fields that should be `static final`. [v2]

2023-09-28 Thread Paul Sandoz
On Thu, 28 Sep 2023 20:39:13 GMT, Eamonn McManus wrote: >> It looks to have been an oversight that `final` was omitted. The fields are >> never assigned after initialization. `final` leads to shorter bytecode. > > Eamonn McManus has updated the pull request with a new target base due to a >

Re: RFR: 8317034: Redundant type cast

2023-09-27 Thread Paul Sandoz
On Wed, 27 Sep 2023 08:50:20 GMT, Mourad Abbay wrote: > Remove redundant type cast in the java.util.stream package. src/java.base/share/classes/java/util/stream/DoublePipeline.java line 391: > 389: if (maxSize < 0) > 390: throw new

Re: RFR: 8316998: Remove redundant type arguments

2023-09-27 Thread Paul Sandoz
On Wed, 27 Sep 2023 00:58:01 GMT, Mourad Abbay wrote: > Remove cases of redundant type arguments in the java.util.stream package. Looks like there are a few others in the package. In `Collectors`, see see construction of `CollectorImpl`. See also `DistinctOp`, `DoublePipeline`, `IntPipeline`,

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Paul Sandoz
On Mon, 25 Sep 2023 16:54:10 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Re: RFR: 8271268: Fix Javadoc links for Stream.mapMulti [v3]

2023-09-22 Thread Paul Sandoz
On Fri, 22 Sep 2023 17:08:48 GMT, Mourad Abbay wrote: >> Fix Javadoc links for Stream.mapMulti, Stream.MapMultiInt, >> Stream.mapMultiToInt, Stream.mapMultiToLong and Stream.mapMultiToDouble. > > Mourad Abbay has updated the pull request incrementally with one additional > commit since the

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v40]

2023-09-21 Thread Paul Sandoz
On Wed, 20 Sep 2023 17:19:42 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays.

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v40]

2023-09-21 Thread Paul Sandoz
On Wed, 20 Sep 2023 17:19:42 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays.

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v40]

2023-09-21 Thread Paul Sandoz
On Wed, 20 Sep 2023 17:19:42 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays.

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v40]

2023-09-21 Thread Paul Sandoz
On Wed, 20 Sep 2023 17:19:42 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays.

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v39]

2023-09-20 Thread Paul Sandoz
On Wed, 20 Sep 2023 16:27:19 GMT, Srinivas Vamsi Parasa wrote: > This API was suggested to me and was already reviewed by others. Confirming so, this was my suggestion. We use the _double-register_ addressing mode (as commonly applied in unsafe), thereby the intrinsic is capable of being

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v39]

2023-09-20 Thread Paul Sandoz
On Wed, 20 Sep 2023 16:27:19 GMT, Srinivas Vamsi Parasa wrote: > This API was suggested to me and was already reviewed by others. Confirming so, this was my suggestion. We use the _double-register_ addressing mode (as commonly applied in unsafe), thereby the intrinsic is capable of being

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v9]

2023-09-20 Thread Paul Sandoz
On Fri, 15 Sep 2023 20:17:17 GMT, Paul Sandoz wrote: >>> Alan, you mentioned that DualPivotQuicksort will need detailed review. Can >>> we go ahead and start reviewing? Laurent checked performance, JMH results >>> look fine. >> >> As before, I t

Re: RFR: 8271268: Fix Javadoc links for Stream.mapMulti

2023-09-20 Thread Paul Sandoz
On Mon, 18 Sep 2023 18:09:57 GMT, Mourad Abbay wrote: > Fix Javadoc links for Stream.mapMulti, Stream.MapMultiInt, > Stream.mapMultiToInt, Stream.mapMultiToLong and Stream.mapMultiToDouble. Note to others. I suggested @mabbay pick up the dropped

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v9]

2023-09-15 Thread Paul Sandoz
On Fri, 1 Sep 2023 06:12:57 GMT, Alan Bateman wrote: > > Alan, you mentioned that DualPivotQuicksort will need detailed review. Can > > we go ahead and start reviewing? Laurent checked performance, JMH results > > look fine. > > As before, I think the main question with this change is whether

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v36]

2023-09-14 Thread Paul Sandoz
On Wed, 13 Sep 2023 23:02:21 GMT, Srinivas Vamsi Parasa wrote: > Could you please have a look at the changes in `DualPivotQuicksort.java` and > provide your feedback? I agree that is much cleaner, glad that worked out. That neatly covers multiple element types and Java-based insertion sort

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v36]

2023-09-14 Thread Paul Sandoz
On Wed, 13 Sep 2023 23:02:21 GMT, Srinivas Vamsi Parasa wrote: > Could you please have a look at the changes in `DualPivotQuicksort.java` and > provide your feedback? I agree that is much cleaner, glad that worked out. That neatly covers multiple element types and Java-based insertion sort

Re: RFR: 8315938: Deprecate for removal Unsafe methods that have standard APIs for many releases

2023-09-08 Thread Paul Sandoz
On Fri, 8 Sep 2023 15:54:05 GMT, Alan Bateman wrote: > There are several methods defined by sun.misc.Unsafe that have standard API > equivalents for many years and releases. The change proposed here is to > deprecate, for removal, the park, unpark, getLoadAverage, loadFence, > storeFence, and

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v33]

2023-09-07 Thread Paul Sandoz
On Thu, 31 Aug 2023 21:31:40 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays.

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v33]

2023-09-07 Thread Paul Sandoz
On Thu, 31 Aug 2023 21:31:40 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays.

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v33]

2023-09-07 Thread Paul Sandoz
On Thu, 31 Aug 2023 21:31:40 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays.

  1   2   3   4   5   6   7   8   9   10   >