Re: RFR: 8288011: StringConcatFactory: Split application of stringifiers

2022-06-08 Thread Jim Laskey
On Wed, 8 Jun 2022 10:20:37 GMT, Claes Redestad wrote: > To take optimal advantage of the pre-existing optimization for repeated > filters we could split the application of different types of stringifiers. > > The resulting difference in order of evaluation is not observable by > conventional

Re: RFR: 8287522: StringConcatFactory: Add in prependers and mixers in batches

2022-05-30 Thread Jim Laskey
On Mon, 23 May 2022 20:03:05 GMT, Claes Redestad wrote: > When generating `MethodHandle`-based concatenation expressions in > `StringConcatFactory` we can reduce the number of classes generated at > runtime by creating small batches of prependers and mixers before binding > them into the root

Re: RFR: 8287292: Improve TransformKey to pack more kinds of transforms efficiently

2022-05-25 Thread Jim Laskey
On Wed, 25 May 2022 09:38:08 GMT, Claes Redestad wrote: > The bespoke caching scheme in `jl.invoke.LambdaFormEditor.TransformKey` > allows keys to be compacted when all byte values of the key fit in 4 bits, > otherwise a byte array is allocated and used. This means that all transforms > with

Re: RFR: 8287013: StringConcatFactory: remove short and byte mixers/prependers

2022-05-19 Thread Jim Laskey
On Thu, 19 May 2022 10:47:23 GMT, Claes Redestad wrote: > The current short and byte mixers and prependers simply delegate to the int > variants. At the LambdaForm level the values has already been implicitly cast > to int, so removing this indirection and directly adapting to call the >

Re: RFR: 8285452: Add a new test library API to replace a file content using FileUtils.java [v5]

2022-04-29 Thread Jim Laskey
On Fri, 29 Apr 2022 10:46:58 GMT, Sibabrata Sahoo wrote: >> Sibabrata Sahoo has updated the pull request incrementally with one >> additional commit since the last revision: >> >> updated to add space character in begining of multiline string > >

Integrated: JDK-8283084 RandomGenerator nextDouble(double, double) is documented incorrectly

2022-04-21 Thread Jim Laskey
On Tue, 5 Apr 2022 14:05:57 GMT, Jim Laskey wrote: > `default float nextFloat(float origin, float bound); ` and `default double > nextDouble(double origin, double bound); ` are documented incorrectly. The > default method checks (origin < bound) and (bound - origin)

Integrated: JDK-8274683 Code example provided by RandomGeneratorFactory does not compile

2022-04-21 Thread Jim Laskey
On Tue, 5 Apr 2022 13:47:57 GMT, Jim Laskey wrote: > A DESCRIPTION OF THE PROBLEM : > In > https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGeneratorFactory.html > the code provided as: > RandomGeneratorFactory best = RandomGener

Re: RFR: 8284866: Add test to JDK-8273056

2022-04-14 Thread Jim Laskey
On Thu, 14 Apr 2022 11:31:03 GMT, Raffaello Giulietti wrote: > Hello, > this is a followup of JDK-8273056 to add a test to check that > Random.nextExponential() produces non-negative results. Hold off on sponsoring - the copyright needs to be updated - PR:

Re: RFR: 8284866: Add test to JDK-8273056 [v2]

2022-04-14 Thread Jim Laskey
On Thu, 14 Apr 2022 15:30:47 GMT, Raffaello Giulietti wrote: >> Hello, >> this is a followup of JDK-8273056 to add a test to check that >> Random.nextExponential() produces non-negative results. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit

Re: RFR: 8284866: Add test to JDK-8273056

2022-04-14 Thread Jim Laskey
On Thu, 14 Apr 2022 11:31:03 GMT, Raffaello Giulietti wrote: > Hello, > this is a followup of JDK-8273056 to add a test to check that > Random.nextExponential() produces non-negative results. Marked as reviewed by jlaskey (Reviewer). - PR:

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Jim Laskey
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. All generators support the byte[] however many ignore

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Jim Laskey
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. Marked as reviewed by jlaskey (Reviewer).

Re: RFR: JDK-8283084 RandomGenerator nextDouble(double, double) is documented incorrectly [v2]

2022-04-11 Thread Jim Laskey
> "if {@code origin} is not finite, > or {@code bound} is not finite, or {@code origin} > is greater than or equal to {@code bound}" > > This is not true. Calling with -Double.MAX_VALUE and Double.MAX_VALUE > satisfies the documented requirements but actually thro

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v18]

2022-03-29 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Use LONG_SLOTS -

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v17]

2022-03-29 Thread Jim Laskey
On Tue, 29 Mar 2022 15:49:51 GMT, liach wrote: >> src/java.base/share/classes/java/lang/runtime/Carrier.java line 335: >> >>> 333: CarrierArray(int primitiveCount, int objectCount) { >>> 334: this.primitives = >>> 335: primitiveCount != 0 ? new

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v17]

2022-03-29 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Add condy static methods -

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v16]

2022-03-29 Thread Jim Laskey
On Mon, 28 Mar 2022 20:32:02 GMT, ExE Boss wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Clean up @return > > src/java.base/share/classes/java/lang/runtime/Ca

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v16]

2022-03-28 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Clean up @return -

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v15]

2022-03-28 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Add carrierClass accessor -

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v14]

2022-03-28 Thread Jim Laskey
On Mon, 28 Mar 2022 13:11:37 GMT, Jim Laskey 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 c

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v14]

2022-03-28 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Update javadoc -

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v13]

2022-03-28 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Update Carrier API -

Integrated: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly

2022-03-22 Thread Jim Laskey
On Fri, 4 Mar 2022 17:54:20 GMT, Jim Laskey wrote: > Several attempts have been made to improve Formatter's numeric performance by > caching the current Locale zero. Such fixes, however, ignore the real issue, > which is the slowness of fetching DecimalFormatSymbols. By directl

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v12]

2022-03-22 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integ

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v11]

2022-03-22 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integ

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v11]

2022-03-22 Thread Jim Laskey
On Mon, 21 Mar 2022 18:02:07 GMT, ExE Boss wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 18 additional

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v11]

2022-03-22 Thread Jim Laskey
On Tue, 22 Mar 2022 10:20:15 GMT, Daniel Fuchs wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 18 addi

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v11]

2022-03-22 Thread Jim Laskey
On Mon, 21 Mar 2022 14:24:30 GMT, Jim Laskey 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 c

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v12]

2022-03-22 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Fix spacing on if( -

Re: RFR: JDK-8283480: Make AbstractStringBuilder sealed

2022-03-21 Thread Jim Laskey
On Tue, 22 Mar 2022 00:01:59 GMT, Joe Darcy wrote: > As part of updating the core libraries to be sealed, the package-access > AbstractStringBuilder, implementation superclass of StringBuilder and > StringBuffer, can be marked as sealed with those two subclasses on its > permits list. LGTM

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v11]

2022-03-21 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v10]

2022-03-21 Thread Jim Laskey
On Mon, 21 Mar 2022 07:29:21 GMT, ExE Boss wrote: >> The package is java.lang.runtime not java.lang.invoke so both fields are not >> accessible. > > Well, you could use `SharedSecrets.getJavaLangInvokeAccess().findStatic(…)` > and `SharedSecrets.getJavaLangInvokeAccess().findVirtual(…)` in 

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v10]

2022-03-18 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with three additional commits since the last revision: - Typos - Update Carrier.java - Red

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v9]

2022-03-18 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Clean up API -

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v8]

2022-03-18 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Remove redundant MethodHandle component(Me

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v7]

2022-03-11 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Revert to {@return} style comments.

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v6]

2022-03-11 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Clarify primitive store in array carriers.

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v5]

2022-03-11 Thread Jim Laskey
On Fri, 11 Mar 2022 15:17:30 GMT, Jim Laskey 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 c

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v5]

2022-03-11 Thread Jim Laskey
On Fri, 11 Mar 2022 15:44:49 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Use long array for primitives >> - Use long arrays for primitives > > s

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v5]

2022-03-11 Thread Jim Laskey
On Fri, 11 Mar 2022 15:53:08 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/runtime/Carrier.java line 380: >> >>> 378: } >>> 379: >>> 380: return Unsafe.ARRAY_LONG_BASE_OFFSET + >> >> Shouldn't you add the offset of the first `int`

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v4]

2022-03-11 Thread Jim Laskey
On Fri, 11 Mar 2022 10:58:23 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Leave public for the time being > > src/java.base/share/classes/java/lang/runtime/

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v4]

2022-03-11 Thread Jim Laskey
On Thu, 10 Mar 2022 22:53:39 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/runtime/Carrier.java line 346: >> >>> 344: * Carrier for longs and integers. >>> 345: */ >>> 346: private final int[] integer

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v5]

2022-03-11 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with two additional commits since the last revision: - Use long array for primitives - Use lo

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v4]

2022-03-11 Thread Jim Laskey
On Fri, 11 Mar 2022 10:42:02 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Leave public for the time being > > src/java.base/share/classes/java/lang/runtime/

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v10]

2022-03-11 Thread Jim Laskey
On Fri, 11 Mar 2022 04:28:00 GMT, Jaikiran Pai wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 14 addi

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v4]

2022-03-10 Thread Jim Laskey
On Thu, 10 Mar 2022 22:29:48 GMT, Maurizio Cimadamore wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Leave public for the time being > > src/java.base/share/classes/java/lang

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v4]

2022-03-10 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Leave public for the time being ---

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v3]

2022-03-10 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v10]

2022-03-10 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integ

Re: RFR: JDK-8282798 java.lang.runtime.Carrier [v2]

2022-03-09 Thread Jim Laskey
then Carrier will ensure that > each client generates carrier objects using the same underlying anonymous > class. > > See JBS for details. Jim Laskey has updated the pull request incrementally with two additional commits since the last revision: - More comments. - Allocate long

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

2022-03-09 Thread Jim Laskey
On Tue, 8 Mar 2022 14:02:39 GMT, Jim Laskey 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 > req

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

2022-03-08 Thread Jim Laskey
On Tue, 8 Mar 2022 16:00:48 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: JDK-8282798 java.lang.runtime.Carrier

2022-03-08 Thread Jim Laskey
On Tue, 8 Mar 2022 16:51:22 GMT, John R Rose wrote: >> src/java.base/share/classes/java/lang/runtime/Carrier.java line 48: >> >>> 46: >>> 47: /** >>> 48: * This class is used to create objects that have number and types of >> >> The class javadoc seems a bit on the thin side. I would say

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

2022-03-08 Thread Jim Laskey
On Tue, 8 Mar 2022 15:48:56 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: JDK-8282798 java.lang.runtime.Carrier

2022-03-08 Thread Jim Laskey
On Tue, 8 Mar 2022 15:50:22 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/runtime/Carrier.java line 432: >> >>> 430: * Construct a new object carrier class based on shape. >>> 431: * >>> 432: * @param carrierShape shape of carrier >> >>

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

2022-03-08 Thread Jim Laskey
On Tue, 8 Mar 2022 15:40:10 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 >>

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

2022-03-08 Thread Jim Laskey
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 require objects containing two integer fields, then Carrier will ensure that

Integrated: JDK-8282144 RandomSupport.convertSeedBytesToLongs sign extension overwrites previous bytes

2022-03-08 Thread Jim Laskey
On Thu, 24 Feb 2022 14:47:50 GMT, Jim Laskey wrote: > Class: ./java.base/share/classes/jdk/internal/util/random/RandomSupport.java > Method: public static long[] convertSeedBytesToLongs(byte[] seed, int n, int > z) > > The method attempts to create an array of longs by cons

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v7]

2022-03-08 Thread Jim Laskey
On Tue, 8 Mar 2022 05:01:56 GMT, Jaikiran Pai wrote: >> Jim Laskey has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add comment about DecimalFormatSymbols being mutable objects. >> - Reve

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v9]

2022-03-08 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integerDe

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v7]

2022-03-08 Thread Jim Laskey
On Mon, 7 Mar 2022 21:24:32 GMT, Roger Riggs wrote: >> Jim Laskey has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add comment about DecimalFormatSymbols being mutable objects. >> - Reve

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v8]

2022-03-08 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integerDe

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v7]

2022-03-07 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integerDefa

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v6]

2022-03-07 Thread Jim Laskey
On Mon, 7 Mar 2022 17:09:37 GMT, Jim Laskey wrote: >> Several attempts have been made to improve Formatter's numeric performance >> by caching the current Locale zero. Such fixes, however, ignore the real >> issue, which is the slowness of fetching DecimalFormatSymbols. By di

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v6]

2022-03-07 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integerDe

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v5]

2022-03-07 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integerDe

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v4]

2022-03-07 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integerDef

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v3]

2022-03-07 Thread Jim Laskey
On Mon, 7 Mar 2022 13:05:09 GMT, Jim Laskey wrote: >> Would it be just as effective and improve performance more broadly to cache >> in DecimalFormatSymbols.getInstance()? >> >> Declarations should be private unless there is a package need. >> In this case, th

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v3]

2022-03-07 Thread Jim Laskey
On Mon, 7 Mar 2022 08:25:19 GMT, Stephen Colebourne wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Too many 'the' > > Just to note that there is also some caching in `DecimalS

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v3]

2022-03-07 Thread Jim Laskey
On Fri, 4 Mar 2022 20:04:42 GMT, Roger Riggs wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Too many 'the' > > src/java.base/share/classes/java/util/Formatter.java line 2025: >

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v3]

2022-03-07 Thread Jim Laskey
On Mon, 7 Mar 2022 00:33:53 GMT, Naoto Sato wrote: >>> will now try and update/use this cached class level static state DFS. That >>> would thus require some kind of thread safety semantics to be implemented >>> for this new getDecimalFormatSymbols(Locale) method, isn't it? >> >> A bit more

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v3]

2022-03-07 Thread Jim Laskey
On Fri, 4 Mar 2022 19:02:29 GMT, Naoto Sato wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Too many 'the' > > src/java.base/share/classes/java/util/Formatter.java line 2026: > >

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v3]

2022-03-07 Thread Jim Laskey
On Fri, 4 Mar 2022 21:14:26 GMT, Roger Riggs wrote: >> As a separate/future issue, perhaps the constructors should be deprecated to >> nudge people to using the static `getInstance` methods. > > Would it be just as effective and improve performance more broadly to cache > in

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v3]

2022-03-04 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integerDe

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly [v2]

2022-03-04 Thread Jim Laskey
> Benchmark Mode Cnt Score Error Units > MyBenchmark.bigDecimalDefaultLocale thrpt 25 94735.293 ± 674.587 ops/s > MyBenchmark.bigDecimalLocaleAlternate thrpt 25 44215.547 ± 291.664 ops/s > MyBenchmark.bigDecimalThaiLocale thrpt 25 91390.997 ± 658.677 ops/s > MyBenchmark.integerDe

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly

2022-03-04 Thread Jim Laskey
On Fri, 4 Mar 2022 19:00:54 GMT, Naoto Sato wrote: >> Several attempts have been made to improve Formatter's numeric performance >> by caching the current Locale zero. Such fixes, however, ignore the real >> issue, which is the slowness of fetching DecimalFormatSymbols. By directly >> caching

Re: RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly

2022-03-04 Thread Jim Laskey
On Fri, 4 Mar 2022 18:59:56 GMT, Naoto Sato wrote: >> Several attempts have been made to improve Formatter's numeric performance >> by caching the current Locale zero. Such fixes, however, ignore the real >> issue, which is the slowness of fetching DecimalFormatSymbols. By directly >> caching

RFR: JDK-8282625 Formatter caches Locale/DecimalFormatSymbols poorly

2022-03-04 Thread Jim Laskey
Several attempts have been made to improve Formatter's numeric performance by caching the current Locale zero. Such fixes, however, ignore the real issue, which is the slowness of fetching DecimalFormatSymbols. By directly caching DecimalFormatSymbols in the Formatter, this enhancement

Re: RFR: 8282551: Properly initialize L32X64MixRandom state

2022-03-02 Thread Jim Laskey
On Tue, 18 Jan 2022 01:39:52 GMT, Devin Smith wrote: > Did a cursory review of the other generators, they seem to set the state > correctly. Marked as reviewed by jlaskey (Reviewer). I'll sponsor this change when you receive your OCA. - PR:

Re: RFR: JDK-8282144 RandomSupport.convertSeedBytesToLongs sign extension overwrites previous bytes

2022-02-27 Thread Jim Laskey
On Fri, 25 Feb 2022 19:58:13 GMT, Brian Burkhalter wrote: >> Class: ./java.base/share/classes/jdk/internal/util/random/RandomSupport.java >> Method: public static long[] convertSeedBytesToLongs(byte[] seed, int n, int >> z) >> >> The method attempts to create an array of longs by consuming

RFR: JDK-8282144 RandomSupport.convertSeedBytesToLongs sign extension overwrites previous bytes

2022-02-24 Thread Jim Laskey
Class: ./java.base/share/classes/jdk/internal/util/random/RandomSupport.java Method: public static long[] convertSeedBytesToLongs(byte[] seed, int n, int z) The method attempts to create an array of longs by consuming the input bytes most significant bit first. New bytes are appended to the

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v8]

2022-02-23 Thread Jim Laskey
On Wed, 23 Feb 2022 01:06:24 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v6]

2022-02-22 Thread Jim Laskey
On Sun, 20 Feb 2022 03:15:22 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: RFR: JDK-8281183: RandomGenerator:NextDouble() default behavior partially fixed by JDK-8280950

2022-02-05 Thread Jim Laskey
On Sun, 6 Feb 2022 00:41:06 GMT, Joe Darcy wrote: > Third time should be the charm to get this issue of out-of-bounds random > numbers fully fixed; sorry for the noise. Marked as reviewed by jlaskey (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7360

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v3]

2022-02-03 Thread Jim Laskey
On Sat, 29 Jan 2022 16:13:46 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Integrated: JDK-8279954 - java/lang/StringBuffer(StringBuilder)/HugeCapacity.java intermittently fails

2022-02-01 Thread Jim Laskey
On Fri, 14 Jan 2022 14:33:13 GMT, Jim Laskey wrote: > Tests were fatally failing (windows) on Github actions. Pumping up the memory > requirements will hopefully alleviate. This pull request has now been integrated. Changeset: bde2b378 Author: Jim Laskey URL:

Re: RFR: JDK-8280950: RandomGenerator:NextDouble() default behavior non conformant after JDK-8280550 fix

2022-01-31 Thread Jim Laskey
On Mon, 31 Jan 2022 22:31:03 GMT, Joe Darcy wrote: > The original fix to JDK-8280550 contained a typo where r rather than bound > was used as the first argument to nextAfter; this PR corrects that issue. LGTM - Marked as reviewed by jlaskey (Reviewer). PR:

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v3]

2022-01-29 Thread Jim Laskey
On Sat, 29 Jan 2022 16:13:46 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: RFR: JDK-8280550: SplittableRandom#nextDouble(double, double) can return result >= bound

2022-01-26 Thread Jim Laskey
On Wed, 26 Jan 2022 02:12:11 GMT, Joe Darcy wrote: > Use floating-point library methods to nudge down the result if needed. The > nextAfter(r, origin) call return the next value in the direction of origin, > handling cases for negative values, etc. > > Changing to call nextDown for the origin

Re: RFR: JDK-8279954 - java/lang/StringBuffer(StringBuilder)/HugeCapacity.java intermittently fails

2022-01-18 Thread Jim Laskey
On Fri, 14 Jan 2022 14:33:13 GMT, Jim Laskey wrote: > Tests were fatally failing (windows) on Github actions. Pumping up the memory > requirements will hopefully alleviate. The first three tests allocate (3 x ) two 2G arrays. Thinking that 5G is cutting it close. - PR:

Re: RFR: JDK-8279954 - java/lang/StringBuffer(StringBuilder)/HugeCapacity.java intermittently fails

2022-01-14 Thread Jim Laskey
On Fri, 14 Jan 2022 14:33:13 GMT, Jim Laskey wrote: > Tests were fatally failing (windows) on Github actions. Pumping up the memory > requirements will hopefully alleviate. "Perhaps one of the systems used to run GHA has an inconsistently sized page file" That has been my t

RFR: JDK-8279954 - java/lang/StringBuffer(StringBuilder)/HugeCapacity.java intermittently fails

2022-01-14 Thread Jim Laskey
Tests were fatally failing (windows) on Github actions. Pumping up the memory requirements will hopefully alleviate. - Commit messages: - Bump up memory requirements. Changes: https://git.openjdk.java.net/jdk/pull/7086/files Webrev:

Re: RFR: 8276694: Pattern trailing unescaped backslash causes internal error

2022-01-06 Thread Jim Laskey
On Mon, 20 Dec 2021 09:57:14 GMT, Masanori Yano wrote: > Could you please review the 8276694 bug fixes? > > A message specific for this exception should be printed instead of an > internal error. This fix adds a new check to output an appropriate exception > message when the regular

Re: RFR: 8278831: Use table lookup for the last two bytes in Integer.getChars

2021-12-16 Thread Jim Laskey
On Wed, 15 Dec 2021 23:04:37 GMT, Claes Redestad wrote: > During TemplatedStrings work Jim has noticed that we could probably profit > from reusing the lookup tables also for the 1 or 2 leftmost bytes: > > // We know there are at most two digits left at this point. >

Re: RFR: 8278185: Custom JRE cannot find non-ASCII named module inside [v4]

2021-12-09 Thread Jim Laskey
On Fri, 3 Dec 2021 12:35:22 GMT, Jim Laskey wrote: >> Toshio Nakamura has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Changed testcase name to JImageNonAsciiNameTest.java > > Change looks reasonable. A regr

Re: RFR: 8275821: Optimize random number generators developed in JDK-8248862 using Math.unsignedMultiplyHigh() [v6]

2021-12-03 Thread Jim Laskey
On Fri, 3 Dec 2021 02:14:51 GMT, Vamsi Parasa wrote: >> This change optimizes random number generators using >> Math.unsignedMultiplyHigh() > > Vamsi Parasa has updated the pull request incrementally with one additional > commit since the last revision: > > minor changes to the benchmark

Re: RFR: 8278205: jlink plugins should dump .class file in debug mode

2021-12-03 Thread Jim Laskey
On Fri, 3 Dec 2021 10:03:30 GMT, Athijegannathan Sundararajan wrote: > jlink plugins dump .class files in debug mode. jpackage tests already set > jlink.debug property to true. LGTM - Marked as reviewed by jlaskey (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6696

Re: RFR: 8278185: Custom JRE cannot find non-ASCII named module inside

2021-12-03 Thread Jim Laskey
On Fri, 3 Dec 2021 07:29:17 GMT, Toshio Nakamura wrote: > Could you review this fix? > > Problem: > Custom JRE generated by jlink cannot find non-ASCII named modules included > inside the JRE. > > Cause and fix: > If module or package name was composed by ASCII then non-ASCII characters, >

Integrated: JDK-8273056 java.util.random does not correctly sample exponential or Gaussian distributions

2021-12-02 Thread Jim Laskey
On Thu, 11 Nov 2021 13:59:51 GMT, Jim Laskey wrote: > The modified ziggurat algorithm is not correctly implemented in > `java.base/jdk/internal/util/random/RandomSupport.java`. > > Create a histogram of a million samples using 2000 uniform bins with the > following range:

Re: RFR: JDK-8273056 java.util.random does not correctly sample exponential or Gaussian distributions [v2]

2021-12-01 Thread Jim Laskey
range from -8 to 8. > > This does not pass a Chi-square test. If you look at the histogram it is > obviously not showing the shape of the PDF for these distributions. Look > closely at the range around zero (e.g. +/- 0.5). Jim Laskey has updated the pull request with a new target ba

  1   2   3   4   5   6   >