Integrated: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet

2022-06-08 Thread XenoAmess
On Tue, 19 Apr 2022 18:00:19 GMT, XenoAmess wrote: > as title. This pull request has now been integrated. Changeset: e01cd7c3 Author: XenoAmess Committer: Stuart Marks URL: https://git.openjdk.java.net/jdk/commit/e01cd7c3ed923cd19509fc972ba6e4aa2991289f Stats: 154 lines in

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v19]

2022-06-08 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: clean up Calendar - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8302/files/bacc9

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-08 Thread XenoAmess
On Wed, 1 Jun 2022 18:26:17 GMT, Naoto Sato wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> do it as naotoj said > > src/java.base/share/classes/java/util/Calendar.java line 2648: &

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-08 Thread XenoAmess
On Wed, 1 Jun 2022 17:34:04 GMT, Stuart Marks wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> do it as naotoj said > > test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 44

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v18]

2022-06-08 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - remove null check for Capacitiable in WhiteBoxResizeTest - Rename type variable per CSR request; minor spec wording change. - Changes: - all: ht

Re: RFR: 8284638: store skip buffers in InputStream Object [v15]

2022-05-30 Thread XenoAmess
On Mon, 30 May 2022 05:29:01 GMT, Alan Bateman wrote: > However, I think your suggestion to change the no-arg read/write be > non-abstract is interesting as it's always a pain to have to implement that. @AlanBateman this need a csr IMO? - PR:

Re: RFR: 8284638: store skip buffers in InputStream Object [v15]

2022-05-29 Thread XenoAmess
On Sun, 29 May 2022 18:23:03 GMT, Sergey Kuksenko wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> invert if; refine javadoc. > > Another InputStreams cleaning direction. > > M

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v16]

2022-05-27 Thread XenoAmess
On Fri, 27 May 2022 16:19:56 GMT, Naoto Sato wrote: >> XenoAmess has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'stuart-marks/pull/8302' into fix_8284780 >> >>

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-05-27 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: do it as naotoj said - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8302/files/230a7

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v14]

2022-05-27 Thread XenoAmess
On Fri, 27 May 2022 05:31:28 GMT, Stuart Marks wrote: >> XenoAmess has updated the pull request with a new target base due to a merge >> or a rebase. The pull request now contains 16 commits: >> >> - Merge branch 'master' of https://git.openjdk.java.net/jdk into fix_82

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v16]

2022-05-27 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - Merge remote-tracking branch 'stuart-marks/pull/8302' into fix_8284780 # Conflicts: #src/java.base/share/classes/java/util/HashSet.java #src/java.b

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v15]

2022-05-27 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with six additional commits since the last revision: - Update src/java.base/share/classes/java/util/LinkedHashSet.java Co-authored-by: liach <7806504+li...@users.noreply.github.com> - Update src/java.base/shar

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-05-26 Thread XenoAmess
On Wed, 18 May 2022 23:20:45 GMT, Stuart Marks wrote: >>> Need to add apiNote documentation section to capacity-based constructors >>> like for maps. >> >> @liach done. > > @XenoAmess oops, sorry for the delay. I think it would be good t

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v13]

2022-05-26 Thread XenoAmess
> as title. XenoAmess has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits: - Merge remote-tracking branch 'openjdk/master' into fix_8284780 # Conflicts: #test/jdk/java/util/HashMap/WhiteBoxResizeTest.java -

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v14]

2022-05-26 Thread XenoAmess
> as title. XenoAmess has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits: - Merge branch 'master' of https://git.openjdk.java.net/jdk into fix_8284780 - Merge remote-tracking branch 'openjdk/master' into fix_8284

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 05:22:44 GMT, Stuart Marks wrote: >> test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 360: >> >>> 358: throw new RuntimeException(e); >>> 359: } >>> 360: }) >> >> These probably need a 

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v12]

2022-05-26 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - add 8284780 to test - redo the tests - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 04:50:33 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add test for newHashSet and newLinkedHashSet > > test/jdk/java/util/HashMap/WhiteBoxResiz

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 05:07:12 GMT, Stuart Marks wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add test for newHashSet and newLinkedHashSet > > src/java.base/share/classes/java/util/Ha

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v11]

2022-05-26 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: rename items to elements - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8302/files/56d02

Re: RFR: 8284638: store skip buffers in InputStream Object [v15]

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 23:23:13 GMT, Sergey Kuksenko wrote: > Is there any practical scenario where the current code (skip buffer > allocation on each invocation) creates issues? @kuksenko Not found any yet :) - PR: https://git.openjdk.java.net/jdk/pull/5872

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-25 Thread XenoAmess
On Wed, 25 May 2022 05:22:44 GMT, Stuart Marks wrote: > Yes, this test fails with IllegalAccessException. Probably it's easiest to > use a VarHandle to get private fields, similar to other usage already in this > test. > > This test case is a bit odd though in that it's supposed to test

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-24 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add test for newHashSet and newLinkedHashSet - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/p

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-05-24 Thread XenoAmess
On Wed, 18 May 2022 23:20:45 GMT, Stuart Marks wrote: >>> Need to add apiNote documentation section to capacity-based constructors >>> like for maps. >> >> @liach done. > > @XenoAmess oops, sorry for the delay. I think it would be good t

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v9]

2022-05-24 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: revert much too changes for newHashSet - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8

Re: RFR: 8284638: store skip buffers in InputStream Object [v12]

2022-05-24 Thread XenoAmess
On Fri, 20 May 2022 21:15:23 GMT, Roger Riggs wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add documents > > src/java.base/share/classes/java/io/InputStream.java line 78: >

Re: RFR: 8284638: store skip buffers in InputStream Object [v15]

2022-05-24 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: invert if; refine javadoc. - Changes: - all:

Re: RFR: 8284638: store skip buffers in InputStream Object [v14]

2022-05-24 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: refine javadoc, remove The "notice..." statement -

Re: RFR: 8284638: store skip buffers in InputStream Object [v12]

2022-05-24 Thread XenoAmess
On Fri, 20 May 2022 21:08:51 GMT, Roger Riggs wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add documents > > src/java.base/share/classes/java/io/InputStream.java line 72: > >&g

Re: RFR: 8284638: store skip buffers in InputStream Object [v13]

2022-05-24 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: rename function skipBufferReference to skipBuffer - Changes:

Re: RFR: 8284638: store skip buffers in InputStream Object [v12]

2022-05-24 Thread XenoAmess
On Fri, 20 May 2022 21:05:07 GMT, Roger Riggs wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add documents > > src/java.base/share/classes/java/io/InputStream.java line 75: > >

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-05-20 Thread XenoAmess
On Wed, 20 Apr 2022 16:36:16 GMT, XenoAmess wrote: >>> no, we use other way, but yes for we take care of thread safety. >> >> Fair enough. >> >>> Don't think it necessary... I think making it cannot touched by other >>> object (with security mana

Re: RFR: 8285295: Need better testing for IdentityHashMap [v4]

2022-05-06 Thread XenoAmess
On Thu, 5 May 2022 23:46:24 GMT, Stuart Marks wrote: > It would be nice if such a test could be written, but as it stands I think > that `Wrappers.java` test is too simplistic. Would adding `Wrappers.java` a method-name white-list mechanism suitable in this situation? - PR:

Withdrawn: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-25 Thread XenoAmess
On Tue, 19 Apr 2022 21:15:29 GMT, XenoAmess wrote: > some thoughts after watching 8285001: Simplify StringLatin1.regionMatches > https://github.com/openjdk/jdk/pull/8292/ > > if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { >

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-25 Thread XenoAmess
On Wed, 20 Apr 2022 21:08:19 GMT, XenoAmess wrote: >> some thoughts after watching 8285001: Simplify StringLatin1.regionMatches >> https://github.com/openjdk/jdk/pull/8292/ >> >> if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { >

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-25 Thread XenoAmess
On Mon, 25 Apr 2022 15:10:01 GMT, Claes Redestad wrote: > Unfortunately this leads to an error for case-insensitive `regionMatches` > between a latin-1-string that contains either of `\u00b5` or `\u00ff` (these > two code-points have upper case codepoints outside of the latin-1 range) and > a

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 21:19:14 GMT, Roger Riggs wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove = check > > Can you run the JMH against the code before either change (or a

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v2]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 20:56:50 GMT, Roger Riggs wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add jmh test > > Thanks for the JMH tests and data. > > The only part needed

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-20 Thread XenoAmess
s LATIN1, so if u1 != c1, then c1 is already lowercase, and > don't need a lowercase cauculation. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: remove = check - Changes: - all: https://git.openjdk.java.net/jdk/pull/

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v2]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 20:09:06 GMT, XenoAmess wrote: >> some thoughts after watching 8285001: Simplify StringLatin1.regionMatches >> https://github.com/openjdk/jdk/pull/8292/ >> >> if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { >

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 21:15:29 GMT, XenoAmess wrote: > some thoughts after watching 8285001: Simplify StringLatin1.regionMatches > https://github.com/openjdk/jdk/pull/8292/ > > if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { >

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v2]

2022-04-20 Thread XenoAmess
s LATIN1, so if u1 != c1, then c1 is already lowercase, and > don't need a lowercase cauculation. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add jmh test - Changes: - all: https://git.openjdk.java.net/jdk/pull/

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v8]

2022-04-20 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add more replaces - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8302/files/704e8

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v7]

2022-04-20 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add more replaces - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8302/files/53fdb

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v6]

2022-04-20 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - add more replaces - add more replaces - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 16:50:06 GMT, Roger Riggs wrote: > Point 1 make sense. Point 2 adds a branch and branches aren't free. Can you > show some jmh data for these cases? @RogerRiggs Bad news is I don't know how to make a jmh benchmark for a not-public class... - PR:

Re: RFR: 8284638: store skip buffers in InputStream Object [v12]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add documents - Changes: - all: https://git.openjdk.java.n

Re: RFR: 8284638: store skip buffers in InputStream Object [v9]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 16:35:25 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove uselsee MIN_SKIP_BUFFER_SIZE > > src/java.base/share/classes/java/io/InputStream.

Re: RFR: 8284638: store skip buffers in InputStream Object [v11]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: skipBufferReference(long) -> skipBufferReference(int) -

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 22:37:21 GMT, jmehrens wrote: >>> > @jmehrens what about this then? I think it safe now(actually this >>> > mechanism is learned from Reader) >>> >>> Reader uses a lock object and it appears that InputStream locks on this >>> (per make/reset) I would assume now that you

Re: RFR: 8284638: store skip buffers in InputStream Object [v10]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: comment added. - Changes: - all: https://git.openjdk.java.n

Re: RFR: 8284638: store skip buffers in InputStream Object [v8]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 16:16:05 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove useless skipBuffer > > src/java.base/share/classes/java/io/InputStream.java line 57: >

Re: RFR: 8284638: store skip buffers in InputStream Object [v9]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: remove uselsee MIN_SKIP_BUFFER_SIZE - Changes: - all:

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 22:17:54 GMT, liach wrote: > Need to add apiNote documentation section to capacity-based constructors like > for maps. @liach done. - PR: https://git.openjdk.java.net/jdk/pull/8302

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v5]

2022-04-20 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add apiNote s - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8302/files/f051c1fa..26bb5

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 20:15:08 GMT, XenoAmess wrote: >> as title. > > XenoAmess has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the previous content of the PR. The pull reques

Re: RFR: 8284638: store skip buffers in InputStream Object [v8]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: remove useless skipBuffer - Changes: - all:

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 22:47:42 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> change to liach operation. > > src/java.base/share/classes/java/io/InputStream.java line 62:

RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-20 Thread XenoAmess
some thoughts after watching 8285001: Simplify StringLatin1.regionMatches https://github.com/openjdk/jdk/pull/8292/ if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { continue; } should be changed to if (((u1 == c1) ?

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-19 Thread XenoAmess
> as title. XenoAmess has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains two new commits since the last revision: - migrate HashSet usa

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v3]

2022-04-19 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - migrate HashSet usages - migrate LinkedHashSet usage - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v2]

2022-04-19 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: fix LinkedHashSet constructor - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8302/fi

RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet

2022-04-19 Thread XenoAmess
as title. - Commit messages: - 8284780: Need methods to create pre-sized HashSet and LinkedHashSet Changes: https://git.openjdk.java.net/jdk/pull/8302/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8302=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284780

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-19 Thread XenoAmess
On Mon, 18 Apr 2022 20:08:23 GMT, jmehrens wrote: > > @jmehrens what about this then? I think it safe now(actually this mechanism > > is learned from Reader) > > Reader uses a lock object and it appears that InputStream locks on this (per > make/reset) I would assume now that you have some

Integrated: 8186958: Need method to create pre-sized HashMap

2022-04-18 Thread XenoAmess
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote: > 8186958: Need method to create pre-sized HashMap This pull request has now been integrated. Changeset: 87faa85c Author: XenoAmess Committer: Stuart Marks URL: https://git.openjdk.java.net/jdk/com

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

2022-04-16 Thread XenoAmess
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

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-15 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: change to liach operation. - Changes: - all:

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

2022-04-14 Thread XenoAmess
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

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

2022-04-14 Thread XenoAmess
> 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/fi

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

2022-04-14 Thread XenoAmess
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 DocumentCac

Re: RFR: 8284638: store skip buffers in InputStream Object [v5]

2022-04-14 Thread XenoAmess
On Thu, 14 Apr 2022 17:41:38 GMT, XenoAmess wrote: >> @jmehrens what about this then? >> I think it safe now(actually this mechanism is learned from Reader) > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: &g

Re: RFR: 8284638: store skip buffers in InputStream Object [v6]

2022-04-14 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: refine jmh - Changes: - all: https://git.openjdk.java.net/jd

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

2022-04-14 Thread XenoAmess
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/a

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

2022-04-14 Thread XenoAmess
> 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 -

Re: RFR: 8284638: store skip buffers in InputStream Object [v4]

2022-04-14 Thread XenoAmess
On Wed, 13 Apr 2022 22:59:13 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add jmh > > test/micro/org/openjdk/bench/java/io/InputStreamSkipBenchmark.java line 54:

Re: RFR: 8284638: store skip buffers in InputStream Object [v5]

2022-04-14 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: refine jmh - Changes: - all: https://git.openjdk.java.net/jd

Re: RFR: 8284638: store skip buffers in InputStream Object [v2]

2022-04-14 Thread XenoAmess
On Wed, 13 Apr 2022 15:09:27 GMT, Roger Riggs wrote: >>> I recommend moving `nr` declaration from the beginning of the method to >>> where it's actually used (here) >> >> @liach done. > > Sorry, I misunderstood your earlier comment: "Sounds reasonable and applied" > as concurring with not

Re: RFR: 8284638: store skip buffers in InputStream Object [v4]

2022-04-14 Thread XenoAmess
On Wed, 13 Apr 2022 22:53:11 GMT, liach wrote: > I suggest we actually write into the byte array to better simulate overheads > (maybe by generating a number with `ThreadLocalRandom`). This sounds reasonable, as each InputStream implementation always need to copy it. > To simulate overhead

Re: RFR: 8284638: store skip buffers in InputStream Object [v4]

2022-04-14 Thread XenoAmess
On Tue, 12 Apr 2022 23:35:06 GMT, liach wrote: > Shouldn't be too problematic, as most skip usages in JDK as I see are > skipping small number of bytes like 2 or 4, or like skipping over attributes > of Java class files. A minimum skip buffer size isn't that helpful, as I > don't think we

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

2022-04-14 Thread XenoAmess
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.

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

2022-04-14 Thread XenoAmess
> 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: ht

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

2022-04-14 Thread XenoAmess
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 li

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

2022-04-14 Thread XenoAmess
> 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: ht

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

2022-04-14 Thread XenoAmess
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,

Re: RFR: 8284638: store skip buffers in InputStream Object

2022-04-14 Thread XenoAmess
On Thu, 14 Apr 2022 15:33:40 GMT, Roger Riggs wrote: > > Why as it already be a unacceptable option for security reason? > > A shared (static) buffer would be visible to application controlled > subclasses when the `read(buffer, 0, len)` method is called. The subclass > could examine the

Re: RFR: 8284638: store skip buffers in InputStream Object [v4]

2022-04-14 Thread XenoAmess
On Thu, 14 Apr 2022 15:36:20 GMT, Roger Riggs wrote: > Can you summarize the performance results and implications. Including the > whole jmh run isn't necessary. @RogerRiggs In short, making such a cache can help performance, and the larger int skip length people call `skip()`, the larger

Re: RFR: 8284638: store skip buffers in InputStream Object

2022-04-13 Thread XenoAmess
On Thu, 14 Apr 2022 02:21:23 GMT, Bernd Eckenfels wrote: > If you consider doing benchmarks in detail maybe consider a static buffer, > too? (Especially if it can be used in multiple implementations?) Why as it already be a unacceptable option for security reason? - PR:

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

2022-04-13 Thread XenoAmess
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

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

2022-04-13 Thread XenoAmess
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/jd

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

2022-04-13 Thread XenoAmess
> 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: ht

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

2022-04-13 Thread XenoAmess
> 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: ht

Re: RFR: 8284638: store skip buffers in InputStream Object [v3]

2022-04-13 Thread XenoAmess
On Wed, 13 Apr 2022 14:56:12 GMT, XenoAmess wrote: >> @jmehrens what about this then? >> I think it safe now(actually this mechanism is learned from Reader) > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revis

Re: RFR: 8284638: store skip buffers in InputStream Object [v2]

2022-04-13 Thread XenoAmess
On Wed, 13 Apr 2022 16:02:10 GMT, Alan Bateman wrote: >>> @AlanBateman You are correct about this. But I wonder if this be a problem, >>> why Reader class can afford store a skip buffer for each Reader. >>> >>> Is there anything different in the situations about skipBuffer in Reader >>> and

Re: RFR: 8284638: store skip buffers in InputStream Object [v4]

2022-04-13 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add jmh - Changes: - all: https://git.openjdk.java.net/jdk/pul

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

2022-04-13 Thread XenoAmess
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 >

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

2022-04-13 Thread XenoAmess
> 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

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

2022-04-13 Thread XenoAmess
> 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 adjustm

Re: RFR: 8284638: store skip buffers in InputStream Object [v3]

2022-04-13 Thread XenoAmess
On Wed, 13 Apr 2022 14:56:12 GMT, XenoAmess wrote: >> @jmehrens what about this then? >> I think it safe now(actually this mechanism is learned from Reader) > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revis

Re: RFR: 8284638: store skip buffers in InputStream Object [v3]

2022-04-13 Thread XenoAmess
On Wed, 13 Apr 2022 15:23:16 GMT, XenoAmess wrote: > > On a side note for unifying the skip buffer implementation of reader vs > > input stream: For the input stream subclasses in the JDK that have their > > own skip with buffering logic (as described in > > https:

Re: RFR: 8284638: store skip buffers in InputStream Object [v3]

2022-04-13 Thread XenoAmess
On Wed, 13 Apr 2022 15:20:06 GMT, liach wrote: > On a side note for unifying the skip buffer implementation of reader vs input > stream: For the input stream subclasses in the JDK that have their own skip > with buffering logic (as described in >

  1   2   3   >