`String.offsetByCodePoints()` delegates to `Character.offsetByCodePoints()`
which in turn specifies the same exception thrown under the same conditions and
the implementation does exactly the same checks. This means we can remove the
check from `String.offsetByCodePoints()` and rely on the one o
and rely on the one of
> `Character.offsetByCodePoints()`.
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 three additional
commits
On Thu, 24 Nov 2022 10:08:31 GMT, Sergey Tsypanov wrote:
> `String.offsetByCodePoints()` delegates to `Character.offsetByCodePoints()`
> which in turn specifies the same exception thrown under the same conditions
> and the implementation does exactly the same checks. This means we c
On Wed, 30 Nov 2022 20:41:47 GMT, Claes Redestad 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 contain
and rely on the one of
> `Character.offsetByCodePoints()`.
Sergey Tsypanov has updated the pull request incrementally with two additional
commits since the last revision:
- Merge remote-tracking branch 'origin/JDK-8297561' into JDK-8297561
- 8297561: Add copyright and chang
and rely on the one of
> `Character.offsetByCodePoints()`.
Sergey Tsypanov has updated the pull request incrementally with two additional
commits since the last revision:
- 8297561: Minor clean-up
- 8297561: Fix copyright year
-
Changes:
- all: https://git.openjdk.org/jdk/p
On Thu, 24 Nov 2022 10:08:31 GMT, Sergey Tsypanov wrote:
> `String.offsetByCodePoints()` delegates to `Character.offsetByCodePoints()`
> which in turn specifies the same exception thrown under the same conditions
> and the implementation does exactly the same checks. This means we c
I found out that this code
public class Main {
public static void main(String[] args) {
String s = "Hello world!";
char[] chars = s.toCharArray();
int point = Character.codePointAt(chars, -1, 1);
}
}
throws `ArrayIndexOutOfBoundsException` instead of JavaDoc-specif
On Fri, 2 Dec 2022 14:47:24 GMT, Roger Riggs wrote:
>> I found out that this code
>>
>> public class Main {
>> public static void main(String[] args) {
>> String s = "Hello world!";
>> char[] chars = s.toCharArray();
>> int point = Character.codePointAt(chars, -1, 1);
On Fri, 2 Dec 2022 12:44:18 GMT, Sergey Tsypanov wrote:
> I found out that this code
>
> public class Main {
> public static void main(String[] args) {
> String s = "Hello world!";
> char[] chars = s.toCharArray();
> int point = Cha
t limit) {
> if (index >= limit || limit < 0 || limit > a.length) {
> throw new IndexOutOfBoundsException();
> }
> return codePointAtImpl(a, index, limit);
> }
>
> I suggest to check the `index` parameter explicitly instead of relying on
> AIOO
On Fri, 2 Dec 2022 15:32:20 GMT, Brett Okken wrote:
> As ArrayIndexOutOfBoundsException is an IndexOutOfBoundsException, it is not
> clear to me how this is not matching the javadoc/spec.
The check within `codePointAt()` doesn't match the spec.
`ArrayIndexOutOfBoundsException` is thrown from t
t limit) {
> if (index >= limit || limit < 0 || limit > a.length) {
> throw new IndexOutOfBoundsException();
> }
> return codePointAtImpl(a, index, limit);
> }
>
> I suggest to check the `index` parameter explicitly instead of relying on
> AIOO
On Fri, 2 Dec 2022 21:31:42 GMT, Roger Riggs wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8298033: Fix test
>
> test/jdk/java/lang/Character/Supplementary.java line 808:
>
On Sat, 3 Dec 2022 18:40:59 GMT, Sergey Tsypanov wrote:
>> test/jdk/java/lang/Character/Supplementary.java line 808:
>>
>>> 806: return;
>>> 807: }
>>> 808: if (expectedException.isInstance(e)) { //
>>> Ch
t limit) {
> if (index >= limit || limit < 0 || limit > a.length) {
> throw new IndexOutOfBoundsException();
> }
> return codePointAtImpl(a, index, limit);
> }
>
> I suggest to check the `index` parameter explicitly instead of relying on
> AIOO
t limit) {
> if (index >= limit || limit < 0 || limit > a.length) {
> throw new IndexOutOfBoundsException();
> }
> return codePointAtImpl(a, index, limit);
> }
>
> I suggest to check the `index` parameter explicitly instead of relying on
> AIOO
t limit) {
> if (index >= limit || limit < 0 || limit > a.length) {
> throw new IndexOutOfBoundsException();
> }
> return codePointAtImpl(a, index, limit);
> }
>
> I suggest to check the `index` parameter explicitly instead of relying on
> AIOO
On Tue, 6 Dec 2022 16:47:05 GMT, Roger Riggs wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8298033: Fix Character.codePointBefore()
>
> src/java.base/share/classes/java
On Fri, 2 Dec 2022 12:44:18 GMT, Sergey Tsypanov wrote:
> I found out that this code
>
> public class Main {
> public static void main(String[] args) {
> String s = "Hello world!";
> char[] chars = s.toCharArray();
> int point = Cha
Newer version of IntelliJ IDEA introduces new
[inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases)
detecting redundant array length check in snippets like
void iterate(T[] items) {
if (items.length == 0) {
return;
On Thu, 8 Dec 2022 12:37:17 GMT, Sergey Tsypanov wrote:
> Newer version of IntelliJ IDEA introduces new
> [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases)
> detecting redundant array length check in snip
On Fri, 9 Dec 2022 14:35:47 GMT, Roger Riggs wrote:
>> Newer version of IntelliJ IDEA introduces new
>> [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases)
>> detecting redundant array length check in snippets like
>>
On Tue, 13 Dec 2022 09:27:24 GMT, Per Minborg wrote:
>> This PR suggests improving performance for read and write operations for the
>> longer primitives in `RandomAccessFile`.
>>
>> These improvements would also propagate to other JDK classes relying on
>> these improved `RandomAccessFile` op
On Tue, 13 Dec 2022 09:27:24 GMT, Per Minborg wrote:
>> This PR suggests improving performance for read and write operations for the
>> longer primitives in `RandomAccessFile`.
>>
>> These improvements would also propagate to other JDK classes relying on
>> these improved `RandomAccessFile` op
On Tue, 13 Dec 2022 19:57:29 GMT, Alan Bateman wrote:
> I think that PR was closed as it went inactive
Yep, I think there I did everything I could, hope this one will be merged as
the changes are helpful
-
PR: https://git.openjdk.org/jdk/pull/11644
we also change it?
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 eight additional
commits since the last revision:
- Merge branch
On Tue, 27 Dec 2022 20:12:51 GMT, Christian Wimmer wrote:
> The method `String.split` contains a fast-path when the regular expression
> parameter is not really a regular expression, but just a single split
> character.
> This fast path vs. slow path check can be constant folded when the regula
On Wed, 4 Jan 2023 15:37:23 GMT, Per Minborg wrote:
> Code in java.io contains many legacy constructs and semantics not recommended
> including:
>
> * C-style array declaration
> * Unnecessary visibility
> * Redundant keywords in interfaces (e.g. public, static)
> * Non-standard naming for
Use the following methods instead of hand-written code:
- Objects.checkFromIndexSize()
- Objects.checkFromToIndex()
-
Commit messages:
- 8299600: Use Objects.check*() where appropriate in java.io
- Merge branch 'master' into index-io
- Fix
- Check from-to in java.io
Changes: http
On Thu, 5 Jan 2023 07:11:57 GMT, Alan Bateman wrote:
>> Indeed there are at least four regression test failures with this as-is:
>>
>> - java/io/InputStream/ReadParams.java
>> - java/io/OutputStream/WriteParams.java
>> - java/io/Writer/WriteParams.java
>> - java/nio/channels/FileChannel/Transfer
> Use the following methods instead of hand-written code:
> - Objects.checkFromIndexSize()
> - Objects.checkFromToIndex()
Sergey Tsypanov has updated the pull request incrementally with two additional
commits since the last revision:
- 8299600: Use checkFromIndexSize in PipedWr
On Wed, 4 Jan 2023 15:50:35 GMT, Sergey Tsypanov wrote:
> Use the following methods instead of hand-written code:
> - Objects.checkFromIndexSize()
> - Objects.checkFromToIndex()
This pull request has now been integrated.
Changeset: d086e82b
Author: Sergey Tsypanov
Committ
On Mon, 9 Jan 2023 03:34:55 GMT, Glavo wrote:
> `JavaLangAccess::newStringUTF8NoRepl` and
> `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They
> always copy arrays, rather than avoiding copying as much as possible as
> javadoc says.
>
> I ran the tier1 test without any n
On Wed, 11 Jan 2023 19:34:39 GMT, Raffaello Giulietti
wrote:
>> This change transforms a O(n^2) path to O(n) when prepending zero padding to
>> decimal outputs, where n is the length of the padding.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional commit
On Thu, 12 Jan 2023 15:31:03 GMT, Raffaello Giulietti
wrote:
>> This change transforms a O(n^2) path to O(n) when prepending zero padding to
>> decimal outputs, where n is the length of the padding.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional commit
On Mon, 9 Jan 2023 03:34:55 GMT, Glavo wrote:
> `JavaLangAccess::newStringUTF8NoRepl` and
> `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They
> always copy arrays, rather than avoiding copying as much as possible as
> javadoc says.
>
> I ran the tier1 test without any n
- `MethodType.ptypes()` can be used instead of `MethodType.parameterList()`
when we don't need a copy
- comparison of two lists can be done without `Stream.reduce()`
-
Commit messages:
- Fix test
- Improve MH
Changes: https://git.openjdk.org/jdk/pull/12025/files
Webrev: https://w
On Tue, 17 Jan 2023 07:43:07 GMT, Per Minborg wrote:
>>>
>>> Do you see any concrete examples of classes in the JDK that could benefit
>>> from a "VarHandlization"?
>>
>> `ImageOutputStreamImpl` and `ImageInputStreamImpl` in
>> `javax.imageio.stream` have some very similar code that might
> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()`
> when we don't need a copy
> - comparison of two lists can be done without `Stream.reduce()`
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revisio
> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()`
> when we don't need a copy
> - comparison of two lists can be done without `Stream.reduce()`
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision
On Tue, 17 Jan 2023 15:30:12 GMT, Rémi Forax wrote:
>> Precious little method handle use in lambda bootstrap since JDK 11. Though I
>> agree with the sentiment - having fixed a number of bootstrap issues in the
>> past - `MethodHandles` is a small step up the abstraction ladder and the
>> code
> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()`
> when we don't need a copy
> - comparison of two lists can be done without `Stream.reduce()`
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last revision
On Tue, 17 Jan 2023 20:51:06 GMT, Rémi Forax wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Polishing
>
> src/java.base/share/classes/java/lang/invoke/MethodHandles.
On Tue, 17 Jan 2023 22:28:50 GMT, Claes Redestad wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Merge map() calls
>
> src/java.base/share/classes/java/lang/invoke/MethodHand
> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()`
> when we don't need a copy
> - comparison of two lists can be done without `Stream.reduce()`
Sergey Tsypanov has updated the pull request incrementally with one additional
commit since the last re
On Tue, 17 Jan 2023 08:22:28 GMT, Sergey Tsypanov wrote:
> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()`
> when we don't need a copy
> - comparison of two lists can be done without `Stream.reduce()`
This pull request has now been integrated.
Chang
On Thu, 19 Jan 2023 13:46:26 GMT, Claes Redestad wrote:
>> Went through the jdk and found a few more places where
>> `ArraysSupport::vectorizedHashCode` can be used, and a few where adhoc
>> methods could be replaced with a plain call to `java.util.Arrays`
>> equivalents. This patch addresses
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("Date:")
.padNext(20, ' ')
.append(DateTimeFormatter.ISO_DATE)
.toFormatter();
String text = d
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 Sun, 22 Jan 2023 10:56:11 GMT, Claes Redestad 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 Sun, 22 Jan 2023 11:36:34 GMT, Claes Redestad 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 Thu, 26 Jan 2023 06:46:16 GMT, Glavo wrote:
> I checked the `java.base` module, and all the `Collection#toArray()` method
> of collections be implemented correctly.
>
> Their return values can be trusted, so many unnecessary array duplication can
> be eliminated.
You could also have a look
On Thu, 26 Jan 2023 10:01:21 GMT, Glavo wrote:
> it is necessary to copy the elements to a larger new array
Right, I missed this is addAll() method. Btw, in this class you could do
similar optimization in constructor as well.
-
PR: https://git.openjdk.org/jdk/pull/12212
On Fri, 27 Jan 2023 14:28:08 GMT, Alan Bateman wrote:
> It might be better to focus on a few specific cases that can be proven to be
> safe
As of trusted collections from java.base we have
- ArrayList
- Arrays.asList()
- HashSet
- LinkedHashSet
- TreeSet
- EnumSet
- ArrayDeque
- COWArrayList
-
`ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire
outdated. This simple clean-up modernizes them.
-
Commit messages:
- Copyright year update
- Modernize Bubldes.equals()
Changes: https://git.openjdk.org/jdk/pull/12328/files
Webrev: https://webrevs.openj
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.
Btw, in `ResourceBundle.CacheKey.equals()` can we replace
Module module = getModule();
Module
> `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:
Fix logic
-
Changes:
- all:
> `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:
Restore logic
-
Changes:
On Wed, 1 Feb 2023 13:18:31 GMT, Per Minborg wrote:
>> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for
>> values in the range [-18h, 18h] for each second that is on an even quarter
>> of an hour (i.e. at most 2*18*4+1 = 145 values).
>>
>> Instead of using a `ConcurrentH
On Sat, 4 Feb 2023 21:34:50 GMT, Tagir F. Valeev wrote:
>> clamp() methods added to Math and StrictMath
>>
>> `int clamp(long, int, int)` is somewhat different, as it accepts a `long`
>> value and safely clamps it to an `int` range. Other overloads work with a
>> particular type (long, float a
On Mon, 13 Feb 2023 09:59:24 GMT, Claes Redestad wrote:
> We can improve various String methods such as `startsWith`, `endsWith` and
> `regionMatches` by leveraging the intrinsified mismatch methods in
> `ArraysSupport`.
Looks simple and harmless.
-
Marked as reviewed by stsypano
On Mon, 13 Feb 2023 22:05:15 GMT, Mandy Chung wrote:
> `LambdaForm` declares int constants for `BasicType::ordinal` to workaround
> JDK-8161245. Now these int constants are no longer needed.This removes
> these int constants and reference `BasicType` enums directly.
src/java.base/share/c
On Sun, 19 Feb 2023 18:41:18 GMT, liach wrote:
> 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not
> thread safe
Marked as reviewed by stsypanov (Author).
-
PR: https://git.openjdk.org/jdk/pull/12643
On Fri, 27 Jan 2023 21:48:26 GMT, Justin Lu wrote:
> This PR proposes introducing a new method to Locale which returns
> Stream
>
> It involves adding an additional method to _LocaleServiceProviderPool_ that
> returns Stream, which _Locale_ can call.
>
> `LocaleServiceProviderPool.streamAllAv
On Fri, 27 Jan 2023 21:48:26 GMT, Justin Lu wrote:
> This PR adds a new method to java.util.Locale which returns Stream
>
> The contents of the Stream are composed of the same underlying elements as
> Locale.getAvailableLocales().
>
> This method allows streaming of the Locale array without cr
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 Fri, 3 Mar 2023 19:04:22 GMT, Jim Laskey wrote:
>> Add the ability to repeatedly append char and CharSequence data to
>> StringBuilder/StringBuffer.
>
> Jim Laskey has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Expand test for StringBu
On Wed, 15 Mar 2023 11:26:21 GMT, Eirik Bjorsnos wrote:
> By avoiding a bit shift operation for the latin1 fast-path test, we can speed
> up the `java.lang.CharacterData.of` method by ~25% for latin1 code points.
>
> The latin1 test is currently implemented as `ch >>> 8 == 0`. We can replace
On Wed, 15 Mar 2023 11:58:14 GMT, Claes Redestad wrote:
>> By avoiding a bit shift operation for the latin1 fast-path test, we can
>> speed up the `java.lang.CharacterData.of` method by ~25% for latin1 code
>> points.
>>
>> The latin1 test is currently implemented as `ch >>> 8 == 0`. We can r
On Wed, 15 Mar 2023 14:31:03 GMT, Eirik Bjorsnos wrote:
>> By avoiding a bit shift operation for the latin1 fast-path test, we can
>> speed up the `java.lang.CharacterData.of` method by ~25% for latin1 code
>> points.
>>
>> The latin1 test is currently implemented as `ch >>> 8 == 0`. We can r
On Tue, 21 Mar 2023 15:41:13 GMT, Per Minborg wrote:
> This PR proposed to lazily initialize the scratch arrays only if/when needed.
Nice idea. Just wonder could we do the same for `BufferedInputStream`?
-
PR Comment: https://git.openjdk.org/jdk/pull/13121#issuecomment-1478546070
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.
-
Commit messages:
- 8
On Thu, 23 Mar 2023 15:18:54 GMT, Chen Liang wrote:
>> But it's just comment clean up
>
> No? The one above is API specification (Javadoc); the one below is comments.
Right, I'll revert it
-
PR Review Comment: https://git.openjdk.org/jdk/pull/13150#discussion_r1146370513
On Wed, 22 Mar 2023 23:01:32 GMT, Chen Liang wrote:
> This change exposes the CLOSED array
Otherwise we have to either call `getInIfOpen()`/`getBufIfOpen` making them at
least protected or dodge this somehow via `SharedSecrets`
> I mean that additional API exposure is acceptable and backward c
On Thu, 23 Mar 2023 14:51:40 GMT, Sergey Tsypanov wrote:
>> src/java.base/share/classes/java/io/BufferedInputStream.java line 211:
>>
>>> 209: throw new IllegalArgumentException("Buffer size <= 0");
>>> 210: }
>>> 211:
> 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, 23 Mar 2023 19:55:04 GMT, Alan Bateman wrote:
>> src/java.base/share/classes/java/io/BufferedInputStream.java line 183:
>>
>>> 181: if (buffer == EMPTY) {
>>> 182: buf = buffer = new byte[size];
>>> 183: }
>>
>> You should probably use compareAndSet here too
On Thu, 23 Mar 2023 19:48:40 GMT, Eirik Bjorsnos 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/BufferedInputStream.java
>>
>>
> 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
> 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 Fri, 24 Mar 2023 10:27:45 GMT, Alan Bateman wrote:
> This will ensure that read, skip, reset, etc. check buf as before
Why do we so heavily rely on `buf` if we can do open/close check with
`getInIfOpen()`?
-
PR Comment: https://git.openjdk.org/jdk/pull/13150#issuecomment-148266
> 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, 23 Mar 2023 21:15:44 GMT, Eirik Bjorsnos 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/BufferedInputStream.java
>>
>>
On Fri, 24 Mar 2023 16:12:13 GMT, Chen Liang wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8304745: Add benchmark
>
> test/micro/org/openjdk/bench/java/io/BufferedInputStream
> 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
> 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 Fri, 24 Mar 2023 17:59:24 GMT, Chen Liang wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8304745: Amend copyright
>
> test/micro/org/openjdk/bench/java/io/BufferedInputStream
> 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 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
On Mon, 23 Jan 2023 11:34:27 GMT, Claes Redestad wrote:
>> The modified code is called only when a user explicitly calls `padNext(int,
>> char)`, i.e. if I modified the example snippet as
>>
>> DateTimeFormatter dtf = new DateTimeFormatterBuilder()
>> .appendLiteral("Date:")
>> //.padNext(20,
On Sun, 22 Jan 2023 09:50:21 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
On Fri, 24 Mar 2023 19:30:22 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
> 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 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
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 all time, so avoiding
it should bring some improvement for cases when we reuse `DateTim
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
On Tue, 28 Mar 2023 16:40:17 GMT, Naoto Sato wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8304745: Fix package
>
> test/micro/org/openjdk/bench/java/time/format/ZonedDateTimeF
dPattern(":MM:dd:HH:mm:v").toFormatter();
> private static final String TEXT = "2015:03:10:12:13:ECT";
>
> @Setup
> public void setUp() {
> ZonedDateTime.parse(TEXT, df);
> }
>
> @Benchmark
> public ZonedDateTime p
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
1 - 100 of 201 matches
Mail list logo