On Thu, 14 Apr 2022 21:27:16 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> java.xml.crypto's usage downgrade grammar to 1.8
I've also written a relea
On Thu, 14 Apr 2022 21:27:16 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> java.xml.crypto's usage downgrade grammar to 1.8
Marked as reviewed by sma
On Thu, 14 Apr 2022 20:16:38 GMT, Sean Mullan wrote:
>>> Are the changes necessary for this part?
>>
>> @seanjmullan no, they are just performance refinement.
>>
>> If you really that wanna 100% sync ,
>>
>> I can use the old 1.8 api to migrate that part, and make a mirror pr to that
>> part
On Thu, 14 Apr 2022 20:16:38 GMT, Sean Mullan wrote:
>>> Are the changes necessary for this part?
>>
>> @seanjmullan no, they are just performance refinement.
>>
>> If you really that wanna 100% sync ,
>>
>> I can use the old 1.8 api to migrate that part, and make a mirror pr to that
>> part
On Thu, 14 Apr 2022 21:27:16 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> java.xml.crypto's usage downgrade grammar to 1.8
So is there any other thi
On Thu, 14 Apr 2022 19:56:22 GMT, Bradford Wetmore wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> add `@LastModified: Apr 2022` to DocumentCache
>
> src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOM
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
java.xml.crypto's usage downgrade grammar to 1.8
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- ne
On Thu, 14 Apr 2022 18:32:03 GMT, Naoto Sato wrote:
>>> Good point! Filed an issue: https://bugs.openjdk.java.net/browse/JDK-8284856
>>
>> @stuart-marks @naotoj I can help solve JDK-8284856 after this pr. But
>> usually we only solve 1 issue in 1 pr, so I think it's better to wait after
>> thi
On Thu, 14 Apr 2022 19:53:45 GMT, Bradford Wetmore wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> add `@LastModified: Apr 2022` to DocumentCache
>
> I learned something new about HashMap today...
>
> I looked at jav
On Thu, 14 Apr 2022 20:11:37 GMT, XenoAmess wrote:
> > Are the changes necessary for this part?
>
> @seanjmullan no, they are just performance refinement.
>
> If you really that wanna 100% sync ,
>
> I can use the old 1.8 api to migrate that part, and make a mirror pr to that
> part of https:
On Thu, 14 Apr 2022 18:10:28 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> add `@LastModified: Apr 2022` to DocumentCache
> Are the changes necessary
On Thu, 14 Apr 2022 18:10:28 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> add `@LastModified: Apr 2022` to DocumentCache
Right, we generally try to
On Thu, 14 Apr 2022 18:10:28 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> add `@LastModified: Apr 2022` to DocumentCache
I learned something new abo
On Thu, 14 Apr 2022 17:06:53 GMT, XenoAmess wrote:
>> Good point! Filed an issue: https://bugs.openjdk.java.net/browse/JDK-8284856
>
>> Good point! Filed an issue: https://bugs.openjdk.java.net/browse/JDK-8284856
>
> @stuart-marks @naotoj I can help solve JDK-8284856 after this pr. But usually
On Thu, 14 Apr 2022 18:05:48 GMT, XenoAmess wrote:
>> src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DocumentCache.java
>> line 3:
>>
>>> 1: /*
>>> 2: * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights
>>> reserved.
>>> 3: */
>>
>> The LastModified
On Thu, 14 Apr 2022 18:10:28 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> add `@LastModified: Apr 2022` to DocumentCache
Marked as reviewed by joehw
On Thu, 14 Apr 2022 17:23:42 GMT, Joe Wang wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert changes on ProcessEnvironment
>
> src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DocumentCache.
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
add `@LastModified: Apr 2022` to DocumentCache
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new:
On Thu, 14 Apr 2022 17:05:39 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes on ProcessEnvironment
src/java.xml/share/classes/com/sun/or
On Wed, 13 Apr 2022 22:53:15 GMT, Naoto Sato wrote:
> Good point! Filed an issue: https://bugs.openjdk.java.net/browse/JDK-8284856
@stuart-marks @naotoj I can help solve JDK-8284856 after this pr. But usually
we only solve 1 issue in 1 pr, so I think it's better to wait after this.
---
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
revert changes on ProcessEnvironment
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new: https://g
On Wed, 13 Apr 2022 23:25:47 GMT, Stuart Marks wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> update LastModified
>
> src/java.base/unix/classes/java/lang/ProcessEnvironment.java line 102:
>
>> 100: /* Only for
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
fix usage in XSAttributeChecker
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new: https://git.op
On Thu, 14 Apr 2022 03:38:52 GMT, Joe Wang wrote:
>>> I suspect the `size*2+1` was a failed attempt at allocating a HashMap of
>>> the correct capacity for `size` mappings.
>>
>> I looked the codes and don't think so..
>> If I'm wrong, I'm glad to fix.
>
> Stuart's right, I looked at the code,
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> update LastModified
LGTM.
-
Marked as reviewed by chegar (Re
On Wed, 13 Apr 2022 19:28:08 GMT, Stuart Marks wrote:
> Reviewers for i18n, net, nio, and security, please review call site changes
> in your areas. Thanks.
Changes to `java.net.http` look good to me. I haven't spotted anything
obviously wrong in the rest, but should defer to reviewers of thes
On Thu, 14 Apr 2022 01:13:18 GMT, XenoAmess wrote:
>> src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java
>> line 1819:
>>
>>> 1817: Map items;
>>> 1818: LargeContainer(int size) {
>>> 1819: items = HashMap.newHashMap(size*2+1
On Thu, 14 Apr 2022 01:15:05 GMT, XenoAmess wrote:
>> src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DocumentCache.java
>> line 171:
>>
>>> 169: _current = 0;
>>> 170: _size = size;
>>> 171: _references = HashMap.newHashMap(_size);
>>
>> Not `_s
On Wed, 13 Apr 2022 22:57:33 GMT, Stuart Marks wrote:
> Not `_size+2` ?
I don't have a idea here why he original use the + 2.
Is there any guy more familiar with this code tell me why?
Thanks!
> I suspect the `size*2+1` was a failed attempt at allocating a HashMap of the
> correct capacity for
On Wed, 13 Apr 2022 23:48:06 GMT, Stuart Marks wrote:
> but I suspect the cleanup may simply be removing them entirely.
+1 for removing it.
-
PR: https://git.openjdk.java.net/jdk/pull/7928
On Wed, 13 Apr 2022 20:06:34 GMT, Naoto Sato wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert changes in:
>> src/java.desktop
>> src/java.management
>> src/jdk.internal.vm.ci
>> src/jdk.jfr
>> src/jdk.
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> update LastModified
src/java.base/unix/classes/java/lang/ProcessEnvironmen
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> update LastModified
src/java.xml/share/classes/com/sun/org/apache/xerces/i
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> update LastModified
src/java.xml/share/classes/com/sun/org/apache/xalan/in
On Wed, 13 Apr 2022 22:40:38 GMT, Stuart Marks wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> update LastModified
>
> src/java.base/share/classes/java/lang/Character.java line 8574:
>
>> 8572: private static
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> update LastModified
src/java.base/share/classes/java/lang/Character.java l
On Wed, 13 Apr 2022 20:06:34 GMT, Naoto Sato wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert changes in:
>> src/java.desktop
>> src/java.management
>> src/jdk.internal.vm.ci
>> src/jdk.jfr
>> src/jdk.
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
update LastModified
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new: https://git.openjdk.java.n
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
Copyright latest year to 2022
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new: https://git.open
On Wed, 13 Apr 2022 16:29:11 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes in:
> src/java.desktop
> src/java.management
> src/jdk
On Wed, 13 Apr 2022 16:29:11 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes in:
> src/java.desktop
> src/java.management
> src/jdk
On Wed, 13 Apr 2022 16:29:11 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes in:
> src/java.desktop
> src/java.management
> src/jdk
On Wed, 13 Apr 2022 16:29:11 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes in:
> src/java.desktop
> src/java.management
> src/jdk
On Wed, 13 Apr 2022 04:24:41 GMT, Stuart Marks wrote:
> I've done some work on add test cases for these new static factory methods,
> and I've also added API notes to the capacity-based constructors to link to
> the new factory methods. Note that even though these are javadoc changes, the
> AP
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
revert changes in:
src/java.desktop
src/java.management
src/jdk.internal.vm.ci
src/jdk.jfr
src/jdk.management.jfr
src/jdk.mana
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with three additional
commits since the last revision:
- Add apiNote to appropriate constructors of HM, LHM, and WHM.
- Add test cases for static factory methods.
- Minor adjustment to test
On Sun, 10 Apr 2022 20:28:16 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request with a new target base due to a merge
> or a rebase. The pull request now contains 17 commits:
>
> - Merge branch 'master' into fix_8186958
> - var
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request with a new target base due to a merge or
a rebase. The pull request now contains 17 commits:
- Merge branch 'master' into fix_8186958
- variable nameToReferenceSize rename to moduleCount
- use (double) D
On Sun, 10 Apr 2022 07:41:05 GMT, Alan Bateman wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> use (double) DEFAULT_LOAD_FACTOR instead of 0.75
>
> src/java.base/share/classes/java/lang/module/Resolver.java line 501:
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
variable nameToReferenceSize rename to moduleCount
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
-
On Wed, 6 Apr 2022 16:02:31 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> use (double) DEFAULT_LOAD_FACTOR instead of 0.75
src/java.base/share/classe
On Sat, 9 Apr 2022 16:02:17 GMT, liach wrote:
> > > Quick question: If the maps are intended to be fixed-size, can't the
> > > users just call `new HashMap<>(size, 1)`, increasing the growth factor to
> > > prevent growth?
> >
> >
> > @liach this questions equals question : "why default load
On Sat, 9 Apr 2022 15:25:47 GMT, XenoAmess wrote:
> > Quick question: If the maps are intended to be fixed-size, can't the users
> > just call `new HashMap<>(size, 1)`, increasing the growth factor to prevent
> > growth?
>
> @liach this questions equals question : "why default load factor be 0
On Sat, 9 Apr 2022 04:33:00 GMT, liach wrote:
> Quick question: If the maps are intended to be fixed-size, can't the users
> just call `new HashMap<>(size, 1)`, increasing the growth factor to prevent
> growth?
@liach this questions equals question : "why default load factor be 0.75 not 1"
In
On Wed, 6 Apr 2022 16:02:31 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> use (double) DEFAULT_LOAD_FACTOR instead of 0.75
Quick question: If the map
On Wed, 6 Apr 2022 16:02:31 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> use (double) DEFAULT_LOAD_FACTOR instead of 0.75
Regarding the scope of cal
On Wed, 6 Apr 2022 16:02:31 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> use (double) DEFAULT_LOAD_FACTOR instead of 0.75
There be another question:
On Wed, 6 Apr 2022 15:57:55 GMT, Alan Bateman wrote:
> I suspect the core-libs label was added when you created it but you've
> expanded it greatly since.
Is there a way for making the bot re-calculate the labels?
-
PR: https://git.openjdk.java.net/jdk/pull/7928
On Wed, 6 Apr 2022 15:55:11 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:
>
> - drop CalculateHashMapCapacityTestJMH
> - refine javadoc for LinkedHashMap
On Wed, 6 Apr 2022 02:38:17 GMT, Stuart Marks wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert changes in jdk.compile
>
> src/java.base/share/classes/java/util/HashMap.java line 2556:
>
>> 2554: */
>> 2555
On Wed, 6 Apr 2022 15:47:50 GMT, XenoAmess wrote:
> I plan to include these changes to issue JDK-8186958, as I don't think it
> better to flood about 50 P5 issues and do them seperately in every places.
>
> That would be a nightmare for reviewers.
I didn't ask for 50 PRs, I just asked if you p
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
use (double) DEFAULT_LOAD_FACTOR instead of 0.75
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- ne
On Wed, 6 Apr 2022 00:54:41 GMT, Stuart Marks wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert changes in jdk.compile
>
> src/java.base/share/classes/java/util/LinkedHashMap.java line 792:
>
>> 790:
>> 791:
On Wed, 6 Apr 2022 14:27:45 GMT, Alan Bateman wrote:
> The current patch touches usages all over the JDK. Is that for illustration
> purposes or are you planning to include them with the methods?
@AlanBateman
I plan to include these changes to issue JDK-8186958, as I don't think it
better to
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with two additional
commits since the last revision:
- drop CalculateHashMapCapacityTestJMH
- refine javadoc for LinkedHashMap#newLinkedHashMap
-
Changes:
- all: https://git.
On Sat, 2 Apr 2022 22:46:19 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes in jdk.compile
The current patch touches usages all over the
On Sat, 2 Apr 2022 22:46:19 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes in jdk.compile
src/java.base/share/classes/java/util/HashMap
On Wed, 6 Apr 2022 01:13:11 GMT, Stuart Marks wrote:
>> src/java.base/share/classes/java/util/LinkedHashMap.java line 804:
>>
>>> 802: * @since 19
>>> 803: */
>>> 804: public static LinkedHashMap newLinkedHashMap(int
>>> numMappings) {
>>
>> `LinkedHashMap` may be often extended
On Tue, 5 Apr 2022 23:16:57 GMT, liach wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> revert changes in jdk.compile
>
> src/java.base/share/classes/java/util/LinkedHashMap.java line 804:
>
>> 802: * @since 19
>
On Sat, 2 Apr 2022 22:46:19 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes in jdk.compile
I've drafted a CSR for this. Please review:
On Sat, 2 Apr 2022 22:46:19 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes in jdk.compile
src/java.base/share/classes/java/util/LinkedH
On Sat, 2 Apr 2022 22:46:19 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> revert changes in jdk.compile
src/java.base/share/classes/java/util/LinkedH
On Wed, 30 Mar 2022 00:12:59 GMT, Stuart Marks wrote:
>> XenoAmess has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - update jmh
>> - refine javadoc; refine implement when expectedSize < 0
>
> OK, finally got some time to look at this. H
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
update codes
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new: https://git.openjdk.java.net/jdk/
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
O
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
S
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
I
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
>
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
>> all
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
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.
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
T
> 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
-
Changes:
- all: https://git.openjdk.java.net/jdk/
On Thu, 24 Mar 2022 17:09:21 GMT, Roger Riggs wrote:
> I'm not too picky about how it is documented, as long as it is clear how the
> number 1610612733 is computed and why its the correct number. And I think
> that's working backward from Integer.MAX_VALUE. As for its precision, its
> almost i
On Thu, 24 Mar 2022 16:46:11 GMT, XenoAmess wrote:
>>> It would be clearer with a comment on the constant or use the expression
>>> (the compiler will evaluate it). `Integer.MAX_VALUE / 4 * 3`.
>>
>> @RogerRiggs
>>
>> No, as `Integer.MAX_VALUE / 4 * 3` is actually 1610612733,
>>
>> and `(int
On Thu, 24 Mar 2022 16:44:50 GMT, XenoAmess wrote:
>> src/java.base/share/classes/java/util/HashMap.java line 2556:
>>
>>> 2554: */
>>> 2555: static int calculateHashMapCapacity(int expectedSize) {
>>> 2556: if (expectedSize >= 1610612736) {
>>
>> It would be clearer with a com
On Thu, 24 Mar 2022 14:54:39 GMT, Roger Riggs wrote:
> It would be clearer with a comment on the constant or use the expression (the
> compiler will evaluate it). `Integer.MAX_VALUE / 4 * 3`.
@RogerRiggs
No, as `Integer.MAX_VALUE / 4 * 3` is actually 1610612733,
and `(int)Math.ceil(161061273
On Thu, 24 Mar 2022 14:36:36 GMT, Roger Riggs wrote:
> This method should say it is using a default load factor (0.75).
@RogerRiggs done.
> The default load factor should be mentioned.
@RogerRiggs done.
-
PR: https://git.openjdk.java.net/jdk/pull/7928
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
refine javadoc about default load factor
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new: https
On Thu, 24 Mar 2022 12:10:28 GMT, XenoAmess wrote:
>> 8186958: Need method to create pre-sized HashMap
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> delete a space.
src/java.base/share/classes/java/util/HashMap.java line 25
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
delete a space.
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new: https://git.openjdk.java.net/j
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
use jmh Blackhole
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new: https://git.openjdk.java.net
On Wed, 23 Mar 2022 21:04:52 GMT, liach wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> use jmh Blackhole
>
> test/jdk/java/util/Collections/CalculateHashMapCapacityTestJMH.java line 42:
>
>> 40: public class Calcula
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
move the static functions to map classes themselves.
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
On Thu, 24 Mar 2022 00:44:02 GMT, liach wrote:
> Note that the methods may have to go to somewhere else in `java.util` if
> `Collections` cannot be loaded too early during startup, as HashMap is loaded
> very early
I'm afraid you are correct... moved the calculation function into HashMap seems
On Thu, 24 Mar 2022 11:15:12 GMT, David Holmes wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> fix javadoc's @return
>
> src/java.base/share/classes/java/util/Collections.java line 5836:
>
>> 5834: * @param
On Thu, 24 Mar 2022 11:14:54 GMT, David Holmes wrote:
>>> That isn't what is returned.
>>
>> @dholmes-ora Yes it isn't actually. but I cannot find a better description
>> string for it.
>>
>> "the pre-processed raw initial capacity for HashMap based classes." is more
>> exact but sounds weird
> 8186958: Need method to create pre-sized HashMap
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
fix javadoc's @return
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7928/files
- new: https://git.openjdk.java
On Thu, 24 Mar 2022 11:14:54 GMT, David Holmes wrote:
>>> That isn't what is returned.
>>
>> @dholmes-ora Yes it isn't actually. but I cannot find a better description
>> string for it.
>>
>> "the pre-processed raw initial capacity for HashMap based classes." is more
>> exact but sounds weird
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote:
> 8186958: Need method to create pre-sized HashMap
src/java.base/share/classes/java/util/Collections.java line 5836:
> 5834: * @param the type of keys maintained by this map
> 5835: * @param the type of mapped valu
1 - 100 of 111 matches
Mail list logo