Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-12 Thread Francesco Nigro
On Thu, 12 Sep 2024 11:14:32 GMT, Per Minborg wrote: >>> Wdyt about the benchmark I have added at [#20829 >>> (comment)](https://github.com/openjdk/jdk/pull/20829#issuecomment-2326404582)? >>> Sadly I didn't yet run against this PR >> >> Let's see what we can do about this later. > >> Wdyt abo

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-12 Thread Per Minborg
On Fri, 6 Sep 2024 12:05:21 GMT, Per Minborg wrote: > Wdyt about the benchmark I have added at [#20829 > (comment)](https://github.com/openjdk/jdk/pull/20829#issuecomment-2326404582)? Added https://bugs.openjdk.org/browse/JDK-833 - PR Comment: https://git.openjdk.org/jdk/pull/

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-06 Thread Per Minborg
On Tue, 3 Sep 2024 07:52:44 GMT, Per Minborg wrote: > This PR proposes to handle smaller FFM copy operations with Java code rather > than transitioning to native code. This will improve performance. In this PR, > copy operations involving zero to 63 bytes will be handled by Java code. > > Here

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-05 Thread Francesco Nigro
On Tue, 3 Sep 2024 07:52:44 GMT, Per Minborg wrote: > This PR proposes to handle smaller FFM copy operations with Java code rather > than transitioning to native code. This will improve performance. In this PR, > copy operations involving zero to 63 bytes will be handled by Java code. > > Here

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-04 Thread Per Minborg
On Tue, 3 Sep 2024 15:23:20 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java >> line 637: >> >>> 635: for (; offset < limit; offset += 8) { >>> 636: final long v = >>> SCOPED_MEMORY_ACCESS.getLong(sr

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Francesco Nigro
On Tue, 3 Sep 2024 15:44:34 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java >> line 642: >> >>> 640: // 0...0X00 >>> 641: if (remaining >= 4) { >>> 642: final int v = >>> SCOPED_MEMORY_A

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Maurizio Cimadamore
On Tue, 3 Sep 2024 11:51:57 GMT, Francesco Nigro wrote: >> This PR proposes to handle smaller FFM copy operations with Java code rather >> than transitioning to native code. This will improve performance. In this >> PR, copy operations involving zero to 63 bytes will be handled by Java code. >>

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Maurizio Cimadamore
On Tue, 3 Sep 2024 15:22:36 GMT, Maurizio Cimadamore wrote: >> This PR proposes to handle smaller FFM copy operations with Java code rather >> than transitioning to native code. This will improve performance. In this >> PR, copy operations involving zero to 63 bytes will be handled by Java cod

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Maurizio Cimadamore
On Tue, 3 Sep 2024 07:52:44 GMT, Per Minborg wrote: > This PR proposes to handle smaller FFM copy operations with Java code rather > than transitioning to native code. This will improve performance. In this PR, > copy operations involving zero to 63 bytes will be handled by Java code. > > Here

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Per Minborg
On Tue, 3 Sep 2024 11:32:26 GMT, Maurizio Cimadamore wrote: >> This PR proposes to handle smaller FFM copy operations with Java code rather >> than transitioning to native code. This will improve performance. In this >> PR, copy operations involving zero to 63 bytes will be handled by Java cod

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Francesco Nigro
On Tue, 3 Sep 2024 07:52:44 GMT, Per Minborg wrote: > This PR proposes to handle smaller FFM copy operations with Java code rather > than transitioning to native code. This will improve performance. In this PR, > copy operations involving zero to 63 bytes will be handled by Java code. > > Here

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Francesco Nigro
On Tue, 3 Sep 2024 07:52:44 GMT, Per Minborg wrote: > This PR proposes to handle smaller FFM copy operations with Java code rather > than transitioning to native code. This will improve performance. In this PR, > copy operations involving zero to 63 bytes will be handled by Java code. > > Here

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Abdelhak Zaaim
On Tue, 3 Sep 2024 07:52:44 GMT, Per Minborg wrote: > This PR proposes to handle smaller FFM copy operations with Java code rather > than transitioning to native code. This will improve performance. In this PR, > copy operations involving zero to 63 bytes will be handled by Java code. > > Here

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Maurizio Cimadamore
On Tue, 3 Sep 2024 07:52:44 GMT, Per Minborg wrote: > This PR proposes to handle smaller FFM copy operations with Java code rather > than transitioning to native code. This will improve performance. In this PR, > copy operations involving zero to 63 bytes will be handled by Java code. > > Here

RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-03 Thread Per Minborg
This PR proposes to handle smaller FFM copy operations with Java code rather than transitioning to native code. This will improve performance. In this PR, copy operations involving zero to 63 bytes will be handled by Java code. Here is what it looks like for Windows x64: ![image](https://github