Re: RFR: 8339205: Optimize StackMapGenerator [v3]

2024-10-04 Thread Shaojin Wen
> Reduce code size by combining calls and defining local variables Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits: - Merge branch 'master' into optim_stack_map_gen_202408 - reduce codeSize - reduce codeSize

Integrated: 8341510: Optimize StackMapGenerator::processFieldInstructions

2024-10-04 Thread Shaojin Wen
On Fri, 4 Oct 2024 02:47:12 GMT, Shaojin Wen wrote: > A small optimization to reduce CodeSize, codeSize reduced from 164 to 140. > > 1. Use local currentFrame to avoid multiple getfields > 2. Use decStack instead of popStack to reduce array access in popStack > 3. Call Util.fieldTypeSymbol to pa

Re: RFR: 8341512: Optimize StackMapGenerator::processInvokeInstructions [v3]

2024-10-04 Thread Shaojin Wen
> A small optimization for StackMapGenerator::processInvokeInstructions. > > 1. Use local currentFrame to avoid multiple getfields > 2. remove Util.methodTypeSymbol(NameAndTypeEntry) > 3. Use decStack instead of popStack to reduce array access in popStack > 4. codeSize reduced from 277 to 262 Sha

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

2024-10-04 Thread Raffaello Giulietti
On Fri, 4 Oct 2024 18:02:21 GMT, fabioromano1 wrote: >> It takes around 100 ms and less than 1 MB to build a table up to 20 rather >> than 29. >> It can be fully constructed in `static { ... }`, avoiding races. >> >> IMO, this would cover the vast majority of the cases encountered in practice.

Re: RFR: 8341548: More concise use of classfile API [v2]

2024-10-04 Thread Shaojin Wen
> java.base should provide best practices for Class File API > > 1. Use fluent coding style > 2. Use aconst_null instead of oadConstant(null) > 3. use astore intead of 'storeLocal(REFERENCE' > 4. use aload instead of 'loadLocal(REFERENCE' > 5. 'lload/lstore' instead of 'loadLocal(LONG)/storeLocal(

Integrated: 8339699: Optimize DataOutputStream writeUTF

2024-10-04 Thread Shaojin Wen
On Fri, 6 Sep 2024 09:58:58 GMT, Shaojin Wen wrote: > PR #20772 introduced an optimization for writeUTF, which can also be used in > DataOutputStream::writeUTF. This pull request has now been integrated. Changeset: b42fbf43 Author:Shaojin Wen URL: https://git.openjdk.org/jdk/commit

Re: RFR: 8311530: Deprecate jdk.jsobject module for removal [v2]

2024-10-04 Thread Kevin Rushforth
On Mon, 23 Sep 2024 16:32:23 GMT, Kevin Rushforth wrote: >> Deprecate the `jdk.jsobject` module for removal from the JDK, and ship it >> with JavaFX instead. >> >> See [JDK-8337280](https://bugs.openjdk.org/browse/JDK-8337280) / PR >> openjdk/jfx#1529 for the JavaFX PR that will include the mo

Re: RFR: 8341510: Optimize StackMapGenerator::processFieldInstructions

2024-10-04 Thread Chen Liang
On Fri, 4 Oct 2024 02:47:12 GMT, Shaojin Wen wrote: > A small optimization to reduce CodeSize, codeSize reduced from 164 to 140. > > 1. Use local currentFrame to avoid multiple getfields > 2. Use decStack instead of popStack to reduce array access in popStack > 3. Call Util.fieldTypeSymbol to pa

Integrated: 8341443: [macos] AppContentTest and SigningOptionsTest failed due to "codesign" does not fails with "--app-content" on macOS 15

2024-10-04 Thread Alexander Matveev
On Wed, 2 Oct 2024 20:32:57 GMT, Alexander Matveev wrote: > - `AppContentTest` and `SigningOptionsTest` failed on macOS 15 due to > `codesign` no longer fails if additional content is added to app image. > - `SigningOptionsTest` fixed by failing `codesign` due to missing identity, > since we on

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-10-04 Thread Maurizio Cimadamore
On Mon, 23 Sep 2024 16:35:18 GMT, Per Minborg wrote: >> This PR prevents sequence layout with padding to be used with the Linker. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Reword doce Following a discussion offline, w

Re: RFR: 8339329: ConstantPoolBuilder#constantValueEntry method doc typo and clarifications [v3]

2024-10-04 Thread duke
On Mon, 30 Sep 2024 14:59:12 GMT, David M. Lloyd wrote: >> Please review this small documentation change to ConstantPoolBuilder to fix >> a typo and clarify the usage of the `constantValueEntry` method. > > David M. Lloyd has updated the pull request incrementally with one additional > commit s

Re: RFR: 8338544: Dedicated Array class descriptor implementation

2024-10-04 Thread Jorn Vernee
On Fri, 4 Oct 2024 18:24:37 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/constant/ArrayClassDescImpl.java >> line 116: >> >>> 114: sb.append(componentDesc); >>> 115: return sb.toString(); >>> 116: } >> >> Is there really that much benefit in lazily com

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v3]

2024-10-04 Thread Francesco Nigro
On Fri, 27 Sep 2024 14:21:57 GMT, Galder Zamarreño wrote: >> This patch intrinsifies `Math.max(long, long)` and `Math.min(long, long)` in >> order to help improve vectorization performance. >> >> Currently vectorization does not kick in for loops containing either of >> these calls because of

Integrated: 8341541: Wrong anchor in wrapper classes links

2024-10-04 Thread Joe Darcy
On Fri, 4 Oct 2024 17:17:53 GMT, Joe Darcy wrote: > Fix broken links. This pull request has now been integrated. Changeset: e70cbcfd Author:Joe Darcy URL: https://git.openjdk.org/jdk/commit/e70cbcfd0c07c0334bf3d5fe20da806129d7565e Stats: 3 lines in 2 files changed: 0 ins; 0 del;

Re: RFR: 8341512: Optimize StackMapGenerator::processInvokeInstructions [v2]

2024-10-04 Thread Chen Liang
On Fri, 4 Oct 2024 14:25:09 GMT, Shaojin Wen wrote: >> A small optimization for StackMapGenerator::processInvokeInstructions. >> >> 1. Use local currentFrame to avoid multiple getfields >> 2. remove Util.methodTypeSymbol(NameAndTypeEntry) >> 3. Use decStack instead of popStack to reduce array ac

Re: RFR: 8341541: Wrong anchor in wrapper classes links

2024-10-04 Thread Chen Liang
On Fri, 4 Oct 2024 17:17:53 GMT, Joe Darcy wrote: > Fix broken links. Thanks, hannes' pr popped up first in the PR list so I omitted this one. - Marked as reviewed by liach (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/21360#pullrequestreview-2348973542

Withdrawn: 8341541: Wrong anchor in wrapper classes links

2024-10-04 Thread Hannes Wallnöfer
On Fri, 4 Oct 2024 17:37:09 GMT, Hannes Wallnöfer wrote: > Please review a doc change to fix the target anchor for the "wrapper class" > links added in #21215. > > In addition to changing the anchor to "wrapperClass" (singular) I also moved > the id attribute to the `` tag so that browser vie

Re: RFR: 8341541: Wrong anchor in wrapper classes links

2024-10-04 Thread Hannes Wallnöfer
On Fri, 4 Oct 2024 19:07:54 GMT, Joe Darcy wrote: >> Please review a doc change to fix the target anchor for the "wrapper class" >> links added in #21215. >> >> In addition to changing the anchor to "wrapperClass" (singular) I also moved >> the id attribute to the `` tag so that browser view

Re: RFR: 8341541: Wrong anchor in wrapper classes links

2024-10-04 Thread Hannes Wallnöfer
On Fri, 4 Oct 2024 17:17:53 GMT, Joe Darcy wrote: > Fix broken links. I hadn't caught the use of the plural form anchor in `Types.java`. Looks good. - Marked as reviewed by hannesw (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/21360#pullrequestreview-2348949061

Re: RFR: 8339699: Optimize DataOutputStream writeUTF [v6]

2024-10-04 Thread Brian Burkhalter
On Fri, 20 Sep 2024 05:09:19 GMT, Shaojin Wen wrote: >> PR #20772 introduced an optimization for writeUTF, which can also be used in >> DataOutputStream::writeUTF. > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > bug fix for

Re: RFR: 8341541: Wrong anchor in wrapper classes links

2024-10-04 Thread Joe Darcy
On Fri, 4 Oct 2024 17:37:09 GMT, Hannes Wallnöfer wrote: > Please review a doc change to fix the target anchor for the "wrapper class" > links added in #21215. > > In addition to changing the anchor to "wrapperClass" (singular) I also moved > the id attribute to the `` tag so that browser vie

Re: RFR: 8340572: ConcurrentModificationException when sorting ArrayList sublists [v2]

2024-10-04 Thread Stuart Marks
On Thu, 3 Oct 2024 19:31:06 GMT, Attila Szegedi wrote: >> Fixes a regression with #17818 where `ArrayList.subList(…).sort()` started >> incrementing `ArrayList.modCount` resulting in some cases throwing a >> `ConcurrentModificationException` where none was thrown before. >> >> This change keep

Re: RFR: 8341541: Wrong anchor in wrapper classes links

2024-10-04 Thread Chen Liang
On Fri, 4 Oct 2024 17:37:09 GMT, Hannes Wallnöfer wrote: > Please review a doc change to fix the target anchor for the "wrapper class" > links added in #21215. > > In addition to changing the anchor to "wrapperClass" (singular) I also moved > the id attribute to the `` tag so that browser vie

Re: RFR: 8338544: Dedicated Array class descriptor implementation

2024-10-04 Thread Chen Liang
On Fri, 4 Oct 2024 17:38:51 GMT, Jorn Vernee wrote: >> @cl4es discovered that Stack Map generation in ClassFile API uses >> `componentType` and `arrayType` for `aaload` `aastore` instructions, which >> are currently quite slow. We can split out array class descriptors from >> class or interfac

Re: RFR: 8338544: Dedicated Array class descriptor implementation

2024-10-04 Thread Jorn Vernee
On Wed, 21 Aug 2024 20:25:07 GMT, Chen Liang wrote: > @cl4es discovered that Stack Map generation in ClassFile API uses > `componentType` and `arrayType` for `aaload` `aastore` instructions, which > are currently quite slow. We can split out array class descriptors from class > or interfaces t

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v3]

2024-10-04 Thread Henry Jen
On Wed, 2 Oct 2024 00:20:32 GMT, Mandy Chung wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Missing from last commit > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java > line 1

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

2024-10-04 Thread fabioromano1
On Fri, 4 Oct 2024 17:48:13 GMT, Raffaello Giulietti wrote: >> @rgiulietti Which means, however, wanting to work with a precision of >> billions of decimal digits, and therefore taking on the consequences... > > It takes around 100 ms and less than 1 MB to build a table up to 20 rather > than

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image [v4]

2024-10-04 Thread Henry Jen
> This PR split out large array/set construction into separate factory methods > to avoid oversized method trying to construct several of those. > > In order to do that, we will need to generate those help methods on demand in > the class builder. Here we have two approach, one is for dedup set,

Re: RFR: 8338596: Clarify handling of restricted and caller-sensitive methods [v6]

2024-10-04 Thread Mandy Chung
On Wed, 2 Oct 2024 05:15:04 GMT, David Holmes wrote: > 3. I will just note that the description for this issue is "Clarify handling > of restricted and caller-sensitive methods" but there is nothing in the > proposed changes that relate to CS methods, and I think we have agreed that > any doc

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

2024-10-04 Thread fabioromano1
On Fri, 4 Oct 2024 17:48:13 GMT, Raffaello Giulietti wrote: >> @rgiulietti Which means, however, wanting to work with a precision of >> billions of decimal digits, and therefore taking on the consequences... > > It takes around 100 ms and less than 1 MB to build a table up to 20 rather > than

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

2024-10-04 Thread Raffaello Giulietti
On Fri, 4 Oct 2024 17:22:32 GMT, fabioromano1 wrote: >> The real problem here is the maximal size this table can reach and the time >> it takes to be filled in the worst case: around 300 MB and several minutes. > > @rgiulietti Which means, however, wanting to work with a precision of > billions

RFR: 8341541: Wrong anchor in wrapper classes links

2024-10-04 Thread Hannes Wallnöfer
Please review a doc change to fix the target anchor for the "wrapper class" links added in #21215. In addition to changing the anchor to "wrapperClass" (singular) I also moved the id attribute to the `` tag so that browser view is positioned over the whole paragraph instead of just the term "w

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

2024-10-04 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: Minor formatting change - Changes: - all: https://git.openjdk.org/jdk/

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

2024-10-04 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: Solving thread-safe issues - Changes: - all: https://git.openjdk.org/j

Integrated: 8340326: Remove references to Applet in core-libs/security tests

2024-10-04 Thread Justin Lu
On Thu, 19 Sep 2024 22:25:25 GMT, Justin Lu wrote: > Please review this PR which removes usages of Applet within the corelibs > tests. > > Most changes are removed comments/updated var names. The JBS issue lists more > files than the ones included in this pull request, please see the comment o

Re: RFR: 8340326: Remove references to Applet in core-libs/security tests [v8]

2024-10-04 Thread Justin Lu
On Thu, 3 Oct 2024 18:15:55 GMT, Justin Lu wrote: >> Please review this PR which removes usages of Applet within the corelibs >> tests. >> >> Most changes are removed comments/updated var names. The JBS issue lists >> more files than the ones included in this pull request, please see the >> c

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

2024-10-04 Thread fabioromano1
On Fri, 4 Oct 2024 17:15:54 GMT, Raffaello Giulietti wrote: >> @fabioromano1, this is a static method manipulating static fields that are >> shared by all instances; whether individual instances are thread safe is a >> separate and unrelated issue. > > The real problem here is the maximal size

RFR: 8341541: Wrong anchor in wrapper classes links

2024-10-04 Thread Joe Darcy
Fix broken links. - Commit messages: - JDK-8341541: Wrong anchor in wrapper classes links Changes: https://git.openjdk.org/jdk/pull/21360/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21360&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8341541 Stats: 3 lines in

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

2024-10-04 Thread Raffaello Giulietti
On Fri, 4 Oct 2024 17:11:51 GMT, Archie Cobbs wrote: >> @archiecobbs AFAIK, the documentation of `BigDecimal` does not specify that >> the class is thread-safe, but I could be wrong... > > @fabioromano1, this is a static method manipulating static fields that are > shared by all instances; whet

Re: RFR: 8338596: Clarify handling of restricted and caller-sensitive methods [v6]

2024-10-04 Thread Hannes Wallnöfer
On Tue, 24 Sep 2024 14:56:19 GMT, Maurizio Cimadamore wrote: >> This PR moves the section on restricted methods from the the javadoc of >> `java.lang.foreign` package into a standalone static [javadoc >> page](https://cr.openjdk.org/~mcimadamore/jdk/restricted_javadoc_section/docs/api/java.bas

Re: RFR: 8338596: Clarify handling of restricted and caller-sensitive methods [v5]

2024-10-04 Thread Hannes Wallnöfer
On Fri, 4 Oct 2024 16:32:50 GMT, Pavel Rappo wrote: >> test/langtools/jdk/javadoc/doclet/testRestricted/TestRestricted.java line 45: >> >>> 43: public static void main(String... args) throws Exception { >>> 44: var tester = new TestRestricted(); >>> 45: tester.setAutomaticChe

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

2024-10-04 Thread Archie Cobbs
On Fri, 4 Oct 2024 17:03:38 GMT, fabioromano1 wrote: >> src/java.base/share/classes/java/math/BigDecimal.java line 5238: >> >>> 5236: BigInteger pow = FIVE_TO_2_TO[FIVE_TO_2_TO_LEN - 1]; >>> 5237: for (int i = FIVE_TO_2_TO_LEN; i <= n; i++) >>> 5238: FIVE_

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

2024-10-04 Thread fabioromano1
On Fri, 4 Oct 2024 16:09:28 GMT, Shaojin Wen wrote: >> fabioromano1 has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge branch 'patchStripTrailingZeros' of >> https://github.com/fabioromano1/jdk into patchStripTrailingZeros >> - Ad

Re: RFR: 8341548: More concise use of classfile API

2024-10-04 Thread ExE Boss
On Fri, 4 Oct 2024 12:05:02 GMT, Shaojin Wen wrote: > java.base should provide best practices for Class File API > > 1. Use fluent coding style > 2. Use aconst_null instead of oadConstant(null) > 3. use astore intead of 'storeLocal(REFERENCE' > 4. use aload instead of 'loadLocal(REFERENCE' > 5.

Re: RFR: 8341548: More concise use of classfile API

2024-10-04 Thread Shaojin Wen
On Fri, 4 Oct 2024 12:05:02 GMT, Shaojin Wen wrote: > java.base should provide best practices for Class File API > > 1. Use fluent coding style > 2. Use aconst_null instead of oadConstant(null) > 3. use astore intead of 'storeLocal(REFERENCE' > 4. use aload instead of 'loadLocal(REFERENCE' > 5.

RFR: 8341548: More concise use of classfile API

2024-10-04 Thread Shaojin Wen
java.base should provide best practices for Class File API 1. Use fluent coding style 2. Use aconst_null instead of oadConstant(null) 3. use astore intead of 'storeLocal(REFERENCE' 4. use aload instead of 'loadLocal(REFERENCE' 5. 'lload/lstore' instead of 'loadLocal(LONG)/storeLocal(LONG)' --

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

2024-10-04 Thread fabioromano1
On Thu, 3 Oct 2024 17:15:34 GMT, Archie Cobbs wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Code simplification > > src/java.base/share/classes/java/math/BigDecimal.java line 5238: > >> 5236: BigInte

Re: RFR: 8339320: Optimize ClassFile Utf8EntryImpl#inflate [v4]

2024-10-04 Thread Shaojin Wen
> A very small optimization, split the large method inflate, split the > infrequently used paths into a method inflateCHAR Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/jdk/internal/classfile/impl

Re: RFR: 8338596: Clarify handling of restricted and caller-sensitive methods [v5]

2024-10-04 Thread Maurizio Cimadamore
On Fri, 4 Oct 2024 16:32:50 GMT, Pavel Rappo wrote: > It will only be `@docRoot` in the JDK, but not in any other code base, and > certainly not in that test. Note: only JDK is allowed to have restricted methods. `@Restricted` is a non-exported JDK annotation. So 3rd party libraries cannot def

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

2024-10-04 Thread Raffaello Giulietti
On Fri, 4 Oct 2024 16:09:28 GMT, Shaojin Wen wrote: >> fabioromano1 has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge branch 'patchStripTrailingZeros' of >> https://github.com/fabioromano1/jdk into patchStripTrailingZeros >> - Ad

Re: RFR: 8338596: Clarify handling of restricted and caller-sensitive methods [v5]

2024-10-04 Thread Pavel Rappo
On Mon, 23 Sep 2024 21:03:08 GMT, Maurizio Cimadamore wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix javadoc test failure > > test/langtools/jdk/javadoc/doclet/testRestricted/TestRestricted.java line 4

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

2024-10-04 Thread Shaojin Wen
On Fri, 4 Oct 2024 14:12:16 GMT, fabioromano1 wrote: >> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses >> repeated squares trick. > > fabioromano1 has updated the pull request incrementally with two additional > commits since the last revision: > > - Merge branch 'patc

Re: RFR: 8339320: Optimize ClassFile Utf8EntryImpl#inflate [v3]

2024-10-04 Thread Chen Liang
On Wed, 25 Sep 2024 01:10:04 GMT, Shaojin Wen wrote: >> A very small optimization, split the large method inflate, split the >> infrequently used paths into a method inflateCHAR > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a rebase. The pull request no

Re: RFR: 8339320: Optimize ClassFile Utf8EntryImpl#inflate [v3]

2024-10-04 Thread Shaojin Wen
On Wed, 25 Sep 2024 01:10:04 GMT, Shaojin Wen wrote: >> A very small optimization, split the large method inflate, split the >> infrequently used paths into a method inflateCHAR > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a rebase. The pull request no

Re: RFR: 8336843: Deprecate java.util.zip.ZipError for removal [v3]

2024-10-04 Thread Eirik Bjørsnøs
On Wed, 28 Aug 2024 08:11:08 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which suggests to deprecate the unused class >> `java.util.zip.ZipError` for removal. >> >> The class has been unsed by OpenJDK since the ZIP API was rewritten from >> native to Java in JDK 9. >> >> I opted to n

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v9]

2024-10-04 Thread Aleksei Efimov
On Wed, 2 Oct 2024 13:38:17 GMT, Aleksei Efimov wrote: >> This PR proposes the following changes to address wrong timeout computations >> in the `com.sun.jndi.dns.DnsClient`: >> - The `DnsClient` has been updated to use a monotonic high-resolution (nano) >> clock. The existing `Timeout` test ha

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v10]

2024-10-04 Thread Aleksei Efimov
> This PR proposes the following changes to address wrong timeout computations > in the `com.sun.jndi.dns.DnsClient`: > - The `DnsClient` has been updated to use a monotonic high-resolution (nano) > clock. The existing `Timeout` test has also been updated to use the nano > clock to measure obser

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

2024-10-04 Thread Archie Cobbs
On Thu, 3 Oct 2024 17:11:09 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: > > Code simplification

Re: RFR: 8341512: Optimize StackMapGenerator::processInvokeInstructions [v2]

2024-10-04 Thread Shaojin Wen
> A small optimization for StackMapGenerator::processInvokeInstructions. > > 1. Use local currentFrame to avoid multiple getfields > 2. remove Util.methodTypeSymbol(NameAndTypeEntry) > 3. Use decStack instead of popStack to reduce array access in popStack > 4. codeSize reduced from 277 to 262 Sha

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

2024-10-04 Thread fabioromano1
> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses > repeated squares trick. fabioromano1 has updated the pull request incrementally with two additional commits since the last revision: - Merge branch 'patchStripTrailingZeros' of https://github.com/fabioromano1/jdk into

Re: RFR: 8341512: Optimize StackMapGenerator::processInvokeInstructions

2024-10-04 Thread ExE Boss
On Fri, 4 Oct 2024 02:15:51 GMT, Shaojin Wen wrote: > A small optimization for StackMapGenerator::processInvokeInstructions. > > 1. Use local currentFrame to avoid multiple getfields > 2. remove Util.methodTypeSymbol(NameAndTypeEntry) > 3. Use decStack instead of popStack to reduce array access

Re: RFR: 8339205: Optimize StackMapGenerator [v2]

2024-10-04 Thread ExE Boss
On Fri, 4 Oct 2024 14:03:20 GMT, Shaojin Wen wrote: >> Reduce code size by combining calls and defining local variables > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 13 commits: > > - reduce codeSize > - reduce

Re: RFR: 8339205: Optimize StackMapGenerator

2024-10-04 Thread Chen Liang
On Wed, 28 Aug 2024 22:20:25 GMT, Shaojin Wen wrote: > Reduce code size by combining calls and defining local variables Can you fix the merge conflicts? - PR Comment: https://git.openjdk.org/jdk/pull/20756#issuecomment-2372834014

Re: RFR: 8339205: Optimize StackMapGenerator [v2]

2024-10-04 Thread Shaojin Wen
> Reduce code size by combining calls and defining local variables Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: - reduce codeSize - reduce codeSize - decStack & stackUnderflow - fix merge error - Merge

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

2024-10-04 Thread fabioromano1
On Fri, 4 Oct 2024 12:28:37 GMT, Raffaello Giulietti wrote: > @fabioromano1 I'll have a look once the commits settle down to something you > consider stable for review. @rgiulietti I think the code is already stable enough now. - PR Comment: https://git.openjdk.org/jdk/pull/21323

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

2024-10-04 Thread Raffaello Giulietti
On Fri, 4 Oct 2024 09:34:54 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: > > Avoid overflow of sc

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

2024-10-04 Thread Raffaello Giulietti
On Fri, 4 Oct 2024 09:34:54 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: > > Avoid overflow of sc

[jdk23] Withdrawn: 8341127: Extra call to MethodHandle::asType from memory segment var handles fails to inline

2024-10-04 Thread Maurizio Cimadamore
On Fri, 4 Oct 2024 09:52:20 GMT, Maurizio Cimadamore wrote: > This is a clean backport of https://git.openjdk.org/jdk/pull/21283 This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/21351

Re: RFR: 8340801: Disable ubsan checks in some awt/2d coding [v2]

2024-10-04 Thread Matthias Baesken
On Wed, 2 Oct 2024 20:29:10 GMT, David Holmes wrote: > I think you could probably place ub.h along-side jni_util.h in that directory. I moved the header to the better location. - PR Comment: https://git.openjdk.org/jdk/pull/21184#issuecomment-2393323469

[jdk23] RFR: 8341127: Extra call to MethodHandle::asType from memory segment var handles fails to inline

2024-10-04 Thread Maurizio Cimadamore
8341127: Extra call to MethodHandle::asType from memory segment var handles fails to inline - Commit messages: - Backport 7fa2f229fbee68112cbdd18b811d95721adfe2ec Changes: https://git.openjdk.org/jdk/pull/21351/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21351&range=00

Integrated: 8341127: Extra call to MethodHandle::asType from memory segment var handles fails to inline

2024-10-04 Thread Maurizio Cimadamore
On Tue, 1 Oct 2024 10:08:54 GMT, Maurizio Cimadamore wrote: > The fix for JDK-8331865 introduced an accidental performance regression. > The main issue is that now *all* memory segment var handles go through some > round of adaptation. > Adapting a var handle results in a so called *indirect* v

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

2024-10-04 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: Avoid overflow of scale - preferredScale - Changes: - all: https://git

Re: RFR: 8340801: Disable ubsan checks in some awt/2d coding [v3]

2024-10-04 Thread Matthias Baesken
> There is some old awt/2d coding where warnings occur when running with ubsan > enabled binaries. > However at most of these locations the coding should work (at least on our > supported platform set) so the warnings can be disabled at least for now. > > The change adds a macro ATTRIBUTE_NO_UBS

Re: RFR: 8341402: BigDecimal's square root optimization [v4]

2024-10-04 Thread fabioromano1
> After changing `BigInteger.sqrt()` algorithm, this can be also used to speed > up `BigDecimal.sqrt()` implementation. Here is how I made it. > > The main steps of the algorithm are as follows: > first argument reduce the value to an integer using the following relations: > > x = y * 10 ^ exp >

Re: RFR: 8341402: BigDecimal's square root optimization [v3]

2024-10-04 Thread fabioromano1
> After changing `BigInteger.sqrt()` algorithm, this can be also used to speed > up `BigDecimal.sqrt()` implementation. Here is how I made it. > > The main steps of the algorithm are as follows: > first argument reduce the value to an integer using the following relations: > > x = y * 10 ^ exp >

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

2024-10-04 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: Code simplification - Changes: - all: https://git.openjdk.org/jdk/pull

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

2024-10-04 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: Code simplification - Changes: - all: https://git.openjdk.org/jdk/pull

Re: RFR: 8341510: Optimize StackMapGenerator::processFieldInstructions

2024-10-04 Thread Shaojin Wen
On Fri, 4 Oct 2024 04:59:04 GMT, Chen Liang wrote: >> A small optimization to reduce CodeSize, codeSize reduced from 164 to 140. >> >> 1. Use local currentFrame to avoid multiple getfields >> 2. Use decStack instead of popStack to reduce array access in popStack >> 3. Call Util.fieldTypeSymbol t