On Fri, 22 Dec 2023 13:00:11 GMT, Sergey Tsypanov wrote:
>> Currently if we create a record it's fields are compared in their
>> declaration order. This might be ineffective in cases when two objects have
>> "heavy" fields equals to each other, but different &q
On Wed, 3 Jan 2024 18:01:59 GMT, Brian Burkhalter wrote:
> The final position instead of the number of bytes to write was being passed
> to `ByteArrayOuputStream.write(byte[],int,int)`.
Marked as reviewed by stsypanov (Author).
-
PR Review: https://git.openjdk.org/jdk/pull/17250#p
On Wed, 29 Nov 2023 11:57:37 GMT, Sergey Tsypanov wrote:
> It looks like we can skip copying of `byte[]` in
> `BufferedInputStream.implTransferTo()` for `OutputStreams` residing in
> `java.io`.
>
> See comment by @vlsi in
> https://github.com/openjdk/jdk/pul
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
Update TransferToTrusted.java
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/
On Sat, 30 Dec 2023 17:52:41 GMT, Markus KARG wrote:
>> `com.sun.management.ThreadMXBean#getCurrentThreadAllocatedBytes` is
>> reliable, isn't it?
>
> According to its JavaDocs it only returns *an approximation*, whatever that
> means. And it is measuring memory, while I already explained that
On Sat, 30 Dec 2023 12:05:22 GMT, Alan Bateman wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8320971: Fix test
>
> src/java.base/share/classes/java/io/BufferedInputStream.java li
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Fix JavaDoc
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/41a7f1a7.
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Fix test
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/ee035998..41a7f1a7
On Sat, 23 Dec 2023 23:18:40 GMT, Markus KARG wrote:
>> Yeah, but how could I intercept the argument of OutputStream.write() and
>> check it's identity?
>
> As I wrote earlier today to Vladimir (see above) I actually do not see a
> solution for this, frankly spoken, as the interceptor would not
On Sat, 23 Dec 2023 13:08:06 GMT, Markus KARG wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8320971: Fix test
>
> test/jdk/java/io/BufferedInputStream/TransferTo
On Thu, 21 Dec 2023 19:43:50 GMT, ExE Boss wrote:
>> src/java.base/share/classes/java/lang/runtime/ObjectMethods.java line 224:
>>
>>> 222: var rt2 = mh2.type().returnType();
>>> 223: return Integer.compare(
>>> 224: rt1.isPrimitive() || rt1.isEnum() || rt
L1
> LOCALVARIABLE this
> Lcom/caspianone/openbanking/productservice/controller/MyRecord; L0 L1 0
> LOCALVARIABLE o Ljava/lang/Object; L0 L1 1
> MAXSTACK = 2
> MAXLOCALS = 2
>
> This can be improved by rearranging the comparison order of the fields moving
e677ecbd977af1R612
Sergey Tsypanov 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 22 additional commits
since the last revision:
- Merge branch
On Thu, 21 Dec 2023 17:29:16 GMT, Brian Burkhalter wrote:
>> Sergey Tsypanov 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 cont
L1
> LOCALVARIABLE this
> Lcom/caspianone/openbanking/productservice/controller/MyRecord; L0 L1 0
> LOCALVARIABLE o Ljava/lang/Object; L0 L1 1
> MAXSTACK = 2
> MAXLOCALS = 2
>
> This can be improved by rearranging the comparison order of the fields moving
On Thu, 21 Dec 2023 01:12:07 GMT, Adam Sotona wrote:
>> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy
>> classes.
>>
>> This patch converts it to use Classfile API.
>>
>> It is continuation of https://github.com/openjdk/jdk/pull/10991
>>
>> Any comments and suggestions
L1
> LOCALVARIABLE this
> Lcom/caspianone/openbanking/productservice/controller/MyRecord; L0 L1 0
> LOCALVARIABLE o Ljava/lang/Object; L0 L1 1
> MAXSTACK = 2
> MAXLOCALS = 2
>
> This can be improved by rearranging the comparison order of the fields moving
L1
> LOCALVARIABLE this
> Lcom/caspianone/openbanking/productservice/controller/MyRecord; L0 L1 0
> LOCALVARIABLE o Ljava/lang/Object; L0 L1 1
> MAXSTACK = 2
> MAXLOCALS = 2
>
> This can be improved by rearranging the comparison order of the fields moving
On Sat, 16 Dec 2023 17:51:30 GMT, Markus KARG wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8320971: Revert irrelevant changes
>
> test/jdk/java/io/BufferedInputStream/TransferTo
e677ecbd977af1R612
Sergey Tsypanov 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 20 additional commits
since the last revision:
L1
> LOCALVARIABLE this
> Lcom/caspianone/openbanking/productservice/controller/MyRecord; L0 L1 0
> LOCALVARIABLE o Ljava/lang/Object; L0 L1 1
> MAXSTACK = 2
> MAXLOCALS = 2
>
> This can be improved by rearranging the comparison order of the fields moving
On Tue, 19 Dec 2023 06:07:31 GMT, Hannes Greule wrote:
> Arrays are compared by reference
Isn't `Arrays.equals()` used under the hood?
> You are sorting the array passed to the bootstrap method
Good point, fixed.
-
PR Comment: https://git.openjdk.org/jdk/pull/17143#issuecomment-1
Currently if we create a record it's fields are compared in their declaration
order. This might be ineffective in cases when two objects have "heavy" fields
equals to each other, but different "lightweight" fields (heavy and lightweight
in terms of comparison) e.g. primitives, enums, nullable/no
On Fri, 15 Dec 2023 17:21:52 GMT, Brian Burkhalter wrote:
>> I think this would be doing double job, wouldn't it?
>
>> I think this would be doing double job, wouldn't it?
>
> Sorry, I don't understand.
If we drop the method for now I have to write it later again, I guess
-
PR Rev
On Thu, 14 Dec 2023 23:04:25 GMT, Brian Burkhalter wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8320971: Revert irrelevant changes
>
> src/java.base/share/classes/java/io/Buf
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Revert irrelevant changes
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/
On Wed, 13 Dec 2023 16:46:16 GMT, Alan Bateman wrote:
>>> It doesn't make sense here to add a new package com.sun.io for a single
>>> method class. This PR does not need to introduce any new classes at this
>>> point. I think this PR needs to focus solely on BIS.
>>
>> So you actually prefer c
On Wed, 13 Dec 2023 09:09:29 GMT, Alan Bateman wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8320971: Fix JavaDoc
>
> src/java.base/share/classes/com/sun/io/IOStreams.java line 2
On Wed, 13 Dec 2023 08:04:59 GMT, Markus KARG wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8320971: Whitespaces
>
> src/java.base/share/classes/com/sun/io/IOStreams.java line 5
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Add more tests
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/c6696e27.
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Fix JavaDoc
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/a3ba43fd.
On Mon, 11 Dec 2023 19:53:40 GMT, Sergey Tsypanov wrote:
>> src/java.base/share/classes/java/io/IOStreams.java line 1:
>>
>>> 1: /*
>>
>> Please fix Whitespace errors. Thanks. :-)
>
> I've just copy-pasted the header from another class. How shou
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Whitespaces
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/50e4e4e5.
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Fix build
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/3576a172..50e4e4e5
On Mon, 11 Dec 2023 14:58:57 GMT, Markus KARG wrote:
>> Sergey Tsypanov 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 cont
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Move IOStreams to com.sun.io
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/
On Mon, 11 Dec 2023 14:54:37 GMT, Markus KARG wrote:
>> Sergey Tsypanov 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 cont
e677ecbd977af1R612
Sergey Tsypanov 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 11 additional commits
since the last revision:
- Merge branch
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Extract utility class
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/
On Wed, 8 Nov 2023 11:55:22 GMT, Glavo wrote:
> This PR significantly speeds up decompressing resources in Jimage while
> significantly reducing temporary memory allocations in the process.
>
> This will improve startup speed for runtime images generated using `jlink
> --compress 1` and `jlink
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Rearrange code
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/9bf4e22d.
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Rewrite comment
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/69fb33f6.
On Fri, 8 Dec 2023 17:23:59 GMT, Markus KARG wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8320971: Use same approach as BAOS
>
> src/java.base/share/classes/java/io/OutputS
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Use same approach as BAOS
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/
e677ecbd977af1R612
Sergey Tsypanov 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 five additional
commits since the last revision:
- Merge branch
On Thu, 30 Nov 2023 09:36:01 GMT, Bernd wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8320971: Trust any OutputStream from java.*
>
> Did you review if all Java.* streams are saf
On Thu, 30 Nov 2023 00:03:21 GMT, Brian Burkhalter wrote:
> Pass `ByteArrayInputStream.buf ` directly to the `OutputStream` parameter of
> `BAIS.transferTo` only if the target stream is in the `java.io` package.
src/java.base/share/classes/java/io/ByteArrayInputStream.java line 211:
> 209:
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Add test
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16879/files/7779aaca..a77208e0
e677ecbd977af1R612
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8320971: Trust any OutputStream from java.*
-
Changes:
- all: https://git.openjdk.org/jdk/pull/16879/files
- new: https://git.openjdk.org/jdk/pull/16
It looks like we can skip copying of `byte[]` in
`BufferedInputStream.implTransferTo()` for `OutputStreams` residing in
`java.io`.
See comment by @vlsi in
https://github.com/openjdk/jdk/pull/10525/files#diff-e19c508d1bb6ee78697ecca66947c395adda0d9c49a85bf696e677ecbd977af1R612
-
Co
On Wed, 30 Aug 2023 09:49:39 GMT, Sergey Tsypanov wrote:
> Assuming that the value written into `in` is always `-1` we can rid
> synchronized block in favour of guarding `in = - 1` with writing into
> volatile `closedByReader `:
>
> public void close() thr
Assuming that the value written into `in` is always `-1` we can rid
synchronized block in favour of guarding `in = - 1` with writing into volatile
`closedByReader `:
public void close() throws IOException {
closedByReader = true;
synchronized (this) {
in = -1;
}
}
-->
publi
On Thu, 13 Jul 2023 08:57:05 GMT, Andrey Turbanov wrote:
> Made a few fields `final` in java.util.Scanner.
> Also made `digits`, `non0Digit`, `SIMPLE_GROUP_INDEX` as `static.`
Marked as reviewed by stsypanov (Author).
-
PR Review: https://git.openjdk.org/jdk/pull/14863#pullrequestr
On Fri, 4 Aug 2023 14:51:35 GMT, Sergey Tsypanov wrote:
> In `publish0()`, `flush0()` and `flushAndClose()`methods of `StreamHandler`
> we read multiple times from volatile writer. The access number can be reduced
> by reading the field into local variable once.
This pull request has
In `publish0()`, `flush0()` and `flushAndClose()`methods of `StreamHandler` we
read multiple times from volatile writer. The access number can be reduced by
reading the field into local variable once.
-
Commit messages:
- 8313768: Reduce interaction with volatile field in j.u.l.Str
On Thu, 27 Jul 2023 16:59:58 GMT, Brian Burkhalter wrote:
>> Then I guess we don't need this `if`-clause
>
> Then I think one gets an error if `0 < len < BUF_SIZE`:
>
>
> $ cat free.c
> #include
>
> int main(int argc, char** argv)
> {
> char stackBuf[8];
> char* buf;
>
> buf = st
On Thu, 27 Jul 2023 15:54:30 GMT, Brian Burkhalter wrote:
>> src/java.base/share/native/libjava/io_util.c line 199:
>>
>>> 197: }
>>> 198:
>>> 199: if (buf != stackBuf)
>>
>> Wouldn't this cause a leak when if-condition is not met and `free(buf)` is
>> not called?
>
> I don't see how
On Tue, 25 Jul 2023 23:50:07 GMT, Brian Burkhalter wrote:
>> Limit native memory allocation and move write loop from the native layer
>> into Java. This change should make the OOME reported in the issue much less
>> likely.
>
> Brian Burkhalter has updated the pull request incrementally with th
On Wed, 21 Jun 2023 14:01:33 GMT, Sergey Tsypanov wrote:
> Just a tiny clean-up to remove racy read within synchronized method
This pull request has now been integrated.
Changeset: d8f2e9ae
Author: Sergey Tsypanov
Committer: Brian Burkhalter
URL:
https://git.openjdk.org/jdk/com
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote:
> Double-checked locking should rely on local variable to avoid racy reads from
> volatile field.
This pull request has been closed without being integrated.
-
PR: https://git.openjdk.org/jdk/pull/14692
On Sat, 1 Jul 2023 07:53:17 GMT, Swati Sharma wrote:
> The below benchmark files have scaling issues due to cache contention and
> leads to poor scaling when run on multiple threads. The patch sets the scope
> from benchmark level to thread level to fix the issue:
> - org/openjdk/bench/java/io/
On Fri, 30 Jun 2023 08:30:45 GMT, Raffaello Giulietti
wrote:
> In the end, this PR is not about fixing a race, as the title seems to suggest
> (the original code is correct), but to avoid a volatile read, right?
Yeah, probably I was wrong in my conclusion. Should I rename the ticket?
On Thu, 29 Jun 2023 12:23:11 GMT, Raffaello Giulietti
wrote:
>> Double-checked locking should rely on local variable to avoid racy reads
>> from volatile field.
>
> The role of the local `keySet` seems pretty useless. It doesn't save neither
> volatile reads nor writes.
@rgiulietti `keySet` i
On Wed, 28 Jun 2023 20:02:58 GMT, Roger Riggs wrote:
>> Double-checked locking should rely on local variable to avoid racy reads
>> from volatile field.
>
> Looks ok; was this a tool detected race?
@RogerRiggs no tool, just fell into the sources while debugging my application
-
PR
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote:
> Double-checked locking should rely on local variable to avoid racy reads from
> volatile field.
It'd be a benign race in case all members of `HashSet` are `final`, but they
aren't, so there are no safe public
Double-checked locking should rely on local variable to avoid racy reads from
volatile field.
-
Commit messages:
- 8311030: ResourceBundle.handleKeySet() is racy
Changes: https://git.openjdk.org/jdk/pull/14692/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14692&range=00
On Tue, 31 Jan 2023 11:40:43 GMT, Sergey Tsypanov wrote:
> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire
> outdated. This simple clean-up modernizes them.
This pull request has now been integrated.
Changeset: 297c7996
Author:Sergey Tsypanov
Committer:
> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire
> outdated. This simple clean-up modernizes them.
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8301492: Revert
-
Changes:
On Sun, 25 Jun 2023 22:32:34 GMT, Pavel Rappo wrote:
>> I'll re-run our CI, and if all good, I'll sponsor this PR.
>
>> I'll re-run our CI, and if all good, I'll sponsor this PR.
>
> The CI tests I started have just passed. While this PR is already good, I
> wonder if we make it even better.
>
On Fri, 23 Jun 2023 22:02:22 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/sun/util/resources/Bundles.java line 510:
>>
>>> 508: return false;
>>> 509: }
>>> 510: return Objects.equals(locale, otherEntry.locale)
>>
>> While the propos
> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire
> outdated. This simple clean-up modernizes them.
Sergey Tsypanov 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
On Fri, 23 Jun 2023 10:41:49 GMT, Pavel Rappo wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Restore logic
>
> src/java.base/share/classes/java/util/ResourceB
On Thu, 22 Jun 2023 21:00:18 GMT, Roger Riggs wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Update src/java.base/share/classes/java/io/PipedOutputStream.java
>>
>>
On Wed, 1 Feb 2023 10:36:12 GMT, Sergey Tsypanov wrote:
>> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire
>> outdated. This simple clean-up modernizes them.
>
> Sergey Tsypanov has updated the pull request incrementally with one
> additional
On Thu, 22 Jun 2023 15:45:21 GMT, Brian Burkhalter wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Update src/java.base/share/classes/java/io/PipedOutputStream.java
>>
>>
On Wed, 21 Jun 2023 14:58:35 GMT, Daniel Fuchs wrote:
>> On second thought, this is probably not necessary; write to the sink field
>> is in another synchronized method, and this method is synchronized already.
>> Is the goal here to remove the synchronized on flush?
>
> Good observation. Remov
> Just a tiny clean-up to remove racy read within synchronized method
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
Update src/java.base/share/classes/java/io/PipedOutputStream.java
Co-authored-by: liach <7806
Just a tiny clean-up to remove racy read within synchronized method
-
Commit messages:
- 8310530: PipedOutputStream.flush() accesses sink racily
Changes: https://git.openjdk.org/jdk/pull/14589/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14589&range=00
Issue: https://bu
On Sun, 4 Jun 2023 11:28:33 GMT, Alan Bateman wrote:
> Thread.sleep has had quite a bit of churn recently to support virtual
> threads, add sleep(Duration), a JFR event, and the change the underlying
> implementation to support sub-millis precision. I think the changes have
> settled down now
On Wed, 1 Feb 2023 10:36:12 GMT, Sergey Tsypanov wrote:
>> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire
>> outdated. This simple clean-up modernizes them.
>
> Sergey Tsypanov has updated the pull request incrementally with one
> additional
On Mon, 3 Apr 2023 16:58:15 GMT, Andrey Turbanov wrote:
> `Pattern.namedGroups` and `Matcher.namedGroups` contains only non-null
> values. It means instead of separate `containsKey`+`get` calls, we can use
> single `HashMap.get` call and then compare result with null.
> Result code is a bit sim
On Sat, 21 Jan 2023 21:01:48 GMT, Sergey Tsypanov wrote:
> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This
> can be reduced to O(1) improving the code like:
>
> DateTimeFormatter dtf = new DateTimeFormatterBuilder()
> .appendLiteral(&quo
On Wed, 1 Feb 2023 10:36:12 GMT, Sergey Tsypanov wrote:
>> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire
>> outdated. This simple clean-up modernizes them.
>
> Sergey Tsypanov has updated the pull request incrementally with one
> additional
On Sat, 25 Mar 2023 05:52:44 GMT, Chen Liang wrote:
> In `AnnotatedTypeBaseImpl`, a `decl` field is declared, referring to the
> declaration that the AnnotatedType is from. However, this field is not used
> anywhere except passing to constructors of other implementations; it's not
> used in de
d(DateTimeFormatter.ISO_DATE)
> .toFormatter();
> String text = dtf.format(LocalDateTime.now());
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8300818: One more benchmark
-
Changes:
- all: https:/
d(DateTimeFormatter.ISO_DATE)
> .toFormatter();
> String text = dtf.format(LocalDateTime.now());
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8300818: Remove blank line
-
Changes:
- all: https:/
On Mon, 17 Apr 2023 15:21:34 GMT, Roger Riggs wrote:
>> @RogerRiggs sorry I don't get it. Maybe you mean speacial casing for
>> `padWidth - len`?
>
> Yes, I meant on the length of the inserted padding.
Done
-
PR Review Comment: https://git.openjdk.org/jdk/pull/12131#discussion_r11
On Sun, 16 Apr 2023 11:20:46 GMT, Sergey Tsypanov wrote:
>> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This
>> can be reduced to O(1) improving the code like:
>>
>> DateTimeFormatter dtf = new DateTimeFormatterBuilder()
>> .appe
d(DateTimeFormatter.ISO_DATE)
> .toFormatter();
> String text = dtf.format(LocalDateTime.now());
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8300818: special cases
-
Changes:
- all: https:/
On Wed, 12 Apr 2023 17:41:58 GMT, Roger Riggs wrote:
>> Added benchmark for this
>
> Special casing for len == 0 and keeping the existing buf.insert for len == 1
> would avoid object creation except when it would improve performance.
@RogerRiggs sorry I don't get it. Maybe you mean speacial cas
d(DateTimeFormatter.ISO_DATE)
> .toFormatter();
> String text = dtf.format(LocalDateTime.now());
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision:
8300818: Extract separate benchmark
-
Changes:
- all: https:/
On Wed, 12 Apr 2023 17:39:16 GMT, Roger Riggs wrote:
>> Sergey Tsypanov 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 conta
On Mon, 3 Apr 2023 16:58:15 GMT, Andrey Turbanov wrote:
> `Pattern.namedGroups` and `Matcher.namedGroups` contains only non-null
> values. It means instead of separate `containsKey`+`get` calls, we can use
> single `HashMap.get` call and then compare result with null.
> Result code is a bit sim
On Mon, 13 Mar 2023 19:24:38 GMT, Roger Riggs wrote:
>> Sergey Tsypanov 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 conta
d(DateTimeFormatter.ISO_DATE)
> .toFormatter();
> String text = dtf.format(LocalDateTime.now());
Sergey Tsypanov 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 req
On Wed, 22 Mar 2023 20:34:08 GMT, Sergey Tsypanov wrote:
> By default `BufferedInputStream` is constructed with internal buffer with
> capacity 8192. In some cases this buffer is never used, e.g. when we call
> `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`
> By default `BufferedInputStream` is constructed with internal buffer with
> capacity 8192. In some cases this buffer is never used, e.g. when we call
> `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when
> `BufferedInputStream` is cascaded.
Sergey Tsypanov
On Thu, 6 Apr 2023 09:23:33 GMT, Jaikiran Pai wrote:
> For this change, I think a benchmark isn't necessary - what would it test,
> how quickly a new BufferedInputStream returns as compared to previous code?
@jaikiran first of all it demonstrates reducing allocation for plain/cascaded
readAll
On Sat, 1 Apr 2023 17:34:37 GMT, Joe Darcy wrote:
> The StringBuilder and StringBuffer classes are Appendable by virtue of from
> subclasses their non-public superclass AbstractStringBuilder.
>
> It is slightly clearer to declare StringBuilder and StringBuffer to directly
> implement Appendabl
On Fri, 17 Feb 2023 09:50:16 GMT, Sergey Tsypanov wrote:
> 1) When `DateTimeFormatter` is reused we don't need to copy
> `availableZoneIds` and allocate `nonRegionIds` as PrefixTree can be taken
> from cache. In the related benchmark allocation of `HashSet` takes ~93% of
1 - 100 of 201 matches
Mail list logo