Re: RFR: 8186958: Need method to create pre-sized HashMap [v7]

2022-03-26 Thread Stuart Marks
On Thu, 24 Mar 2022 17:43:31 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with two additional > commits since the last revision: > > - update jmh > - refine javadoc; refine implement when expectedSize < 0

Re: RFR: 8186958: Need method to create pre-sized HashMap [v7]

2022-03-26 Thread XenoAmess
On Thu, 24 Mar 2022 17:43:31 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with two additional > commits since the last revision: > > - update jmh > - refine javadoc; refine implement when expectedSize < 0

Re: RFR: 8186958: Need method to create pre-sized HashMap [v7]

2022-03-26 Thread Chris Hegarty
On Sat, 26 Mar 2022 12:51:04 GMT, liach wrote: >>> You probably wanna allow for a non-NEW instance for the corner case where >>> the given size is 0 - no elements. >> >> @ChrisHegarty I guess we shouldn't. >> >> I want to make it 100% equals to `new HashMap()` constructor, thus migrate >>

Re: RFR: 8282429: StringBuilder/StringBuffer.toString() skip compressing for UTF16 strings [v5]

2022-03-26 Thread Daniel Jeliński
On Wed, 23 Mar 2022 00:35:14 GMT, Xin Liu wrote: >> If AbstractStringBuilder only grow, the inflated value which has been >> encoded in UTF16 can't be compressed. >> toString() can skip compression in this case. This can save an >> ArrayAllocation in StringUTF16::compress(). >> >>

Re: RFR: 8282662: Use List/Set.of() factory methods to reduce memory consumption [v3]

2022-03-26 Thread Сергей Цыпанов
On Thu, 10 Mar 2022 08:52:17 GMT, Сергей Цыпанов wrote: >> `List.of()` along with `Set.of()` create unmodifiable `List/Set` but with >> smaller footprint comparing to `Arrays.asList()` / `new HashSet()` when >> called with vararg of size 0, 1, 2. >> >> In general replacement of

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v2]

2022-03-26 Thread Joe Darcy
On Fri, 4 Mar 2022 17:44:44 GMT, Ludovic Henry wrote: >> Despite the hash value being cached for Strings, computing the hash still >> represents a significant CPU usage for applications handling lots of text. >> >> Even though it would be generally better to do it through an enhancement to >>

Re: RFR: 8282662: Use List/Set.of() factory methods to reduce memory consumption [v3]

2022-03-26 Thread liach
On Thu, 10 Mar 2022 08:52:17 GMT, Сергей Цыпанов wrote: >> `List.of()` along with `Set.of()` create unmodifiable `List/Set` but with >> smaller footprint comparing to `Arrays.asList()` / `new HashSet()` when >> called with vararg of size 0, 1, 2. >> >> In general replacement of

Integrated: 8283720: ProblemList java/time/test/java/time/TestZoneOffset.java

2022-03-26 Thread Daniel D . Daugherty
On Sat, 26 Mar 2022 13:04:33 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/time/test/java/time/TestZoneOffset.java. This pull request has now been integrated. Changeset: c587b29b Author:Daniel D. Daugherty URL:

Re: RFR: 8283720: ProblemList java/time/test/java/time/TestZoneOffset.java

2022-03-26 Thread Daniel D . Daugherty
On Sat, 26 Mar 2022 13:25:00 GMT, Alan Bateman wrote: >> A trivial fix to ProblemList java/time/test/java/time/TestZoneOffset.java. > > Marked as reviewed by alanb (Reviewer). @AlanBateman - Thanks for the fast review! Especially for a Saturday... - PR:

Re: RFR: 8283720: ProblemList java/time/test/java/time/TestZoneOffset.java

2022-03-26 Thread Alan Bateman
On Sat, 26 Mar 2022 13:04:33 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/time/test/java/time/TestZoneOffset.java. Marked as reviewed by alanb (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7970

RFR: 8283720: ProblemList java/time/test/java/time/TestZoneOffset.java

2022-03-26 Thread Daniel D . Daugherty
A trivial fix to ProblemList java/time/test/java/time/TestZoneOffset.java. - Commit messages: - 8283720: ProblemList java/time/test/java/time/TestZoneOffset.java Changes: https://git.openjdk.java.net/jdk/pull/7970/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=7970=00

Re: RFR: 8186958: Need method to create pre-sized HashMap [v7]

2022-03-26 Thread liach
On Sat, 26 Mar 2022 12:14:25 GMT, XenoAmess wrote: >> src/java.base/share/classes/java/util/HashMap.java line 2584: >> >>> 2582: >>> 2583: /** >>> 2584: * Creates a new, empty HashMap with an initial table size >> >> You probably wanna allow for a non-NEW instance for the corner case

Re: RFR: 8186958: Need method to create pre-sized HashMap [v7]

2022-03-26 Thread XenoAmess
On Sat, 26 Mar 2022 10:53:05 GMT, Chris Hegarty wrote: > You probably wanna allow for a non-NEW instance for the corner case where the > given size is 0 - no elements. @ChrisHegarty I guess we shouldn't. I want to make it 100% equals to `new HashMap()` constructor, thus migrate all usecases.

Re: RFR: 8282819: Deprecate Locale class constructors [v3]

2022-03-26 Thread Lance Andersen
On Fri, 25 Mar 2022 22:51:23 GMT, Naoto Sato wrote: >> Proposing to deprecate the constructors in the `java.util.Locale` class. >> There is already a factory method and a builder to return singletons, so >> there is no need to have constructors anymore unless one purposefully wants >> to

Re: RFR: 8186958: Need method to create pre-sized HashMap [v7]

2022-03-26 Thread Chris Hegarty
On Thu, 24 Mar 2022 17:43:31 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with two additional > commits since the last revision: > > - update jmh > - refine javadoc; refine implement when expectedSize < 0

Re: RFR: 8283683: Make ThreadLocalRandom a final class

2022-03-26 Thread Chris Hegarty
On Fri, 25 Mar 2022 13:32:21 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which marks the `ThreadLocalRandom` > class as `final`? Related JBS issue > https://bugs.openjdk.java.net/browse/JDK-8283683. > > A CSR has been filed too