On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Fri, 19 Jul 2024 21:46:07 GMT, Roger Riggs wrote:
>> Shaojin Wen has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Update src/java.base/share/classes/java/lang/String.java
>>
>>Co-authored-by: Chen Liang
>> - add comments
>
On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Tue, 23 Jul 2024 12:49:52 GMT, Shaojin Wen wrote:
>> Yes, this isn't beholden to JLS 15.18.1, and it's already specified that
>> `foo.concat("")` returns `foo` - so why shouldn't `"".concat(foo)` return
>> `foo`? But still it's an observable semantic change so some care needs to be
>> taken
On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Tue, 23 Jul 2024 12:37:40 GMT, Claes Redestad wrote:
>> The spec for concat only asked for equal representation instead of the
>> existence of a new identity. Thus this should be fine.
>
> Yes, this isn't beholden to JLS 15.18.1, and it's already specified that
> `foo.concat("")` returns `fo
> Currently simpleConcat is implemented using mix and prepend, but in this
> simple scenario, it can be implemented in a simpler way and can improve
> performance.
Shaojin Wen has updated the pull request incrementally with one additional
commit since the last revision:
reduce change
--
On Tue, 23 Jul 2024 12:12:41 GMT, Chen Liang wrote:
>> src/java.base/share/classes/java/lang/String.java line 2991:
>>
>>> 2989: }
>>> 2990: if (isEmpty()) {
>>> 2991: return str;
>>
>> This case should probably be reflected more precisely in the specification,
>> o
On Tue, 23 Jul 2024 12:16:00 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request with a new target base due to
On Tue, 23 Jul 2024 12:01:51 GMT, Claes Redestad wrote:
>> Shaojin Wen has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Update src/java.base/share/classes/java/lang/String.java
>>
>>Co-authored-by: Chen Liang
>> - add comments
> Currently simpleConcat is implemented using mix and prepend, but in this
> simple scenario, it can be implemented in a simpler way and can improve
> performance.
Shaojin Wen has updated the pull request with a new target base due to a merge
or a rebase. The pull request now contains ten commi
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with two additio
On Mon, 22 Jul 2024 07:24:08 GMT, Shaojin Wen wrote:
>>> If code is generated through ClassFile, how to access the private methods
>>> of classes such as String/StringConcatHelper?
>>
>> In that case, you have to encode those methods as live `MethodHandle`
>> objects, passed to the generated c
On Sat, 20 Jul 2024 06:41:25 GMT, Chen Liang wrote:
> > If code is generated through ClassFile, how to access the private methods
> > of classes such as String/StringConcatHelper?
>
> In that case, you have to encode those methods as live `MethodHandle`
> objects, passed to the generated class
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with two additio
On Sat, 20 Jul 2024 13:16:16 GMT, Brett Okken wrote:
>> src/java.base/share/classes/java/lang/StringConcatHelper.java line 387:
>>
>>> 385: byte[] buf = newArray(newLength);
>>> 386: s1.getBytes(buf, 0, coder);
>>> 387: s2.getBytes(buf, s1.length(), coder);
>>
>> Does s1
On Sat, 20 Jul 2024 13:11:33 GMT, Brett Okken wrote:
>> Shaojin Wen has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Update src/java.base/share/classes/java/lang/String.java
>>
>>Co-authored-by: Chen Liang
>> - add comments
>
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with two additio
On Sat, 20 Jul 2024 06:28:12 GMT, Shaojin Wen wrote:
> If code is generated through ClassFile, how to access the private methods of
> classes such as String/StringConcatHelper?
In that case, you have to encode those methods as live `MethodHandle` objects,
passed to the generated class with `de
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with two additio
On Fri, 19 Jul 2024 22:49:41 GMT, Shaojin Wen wrote:
>> FWIW one of the ideas when implementing `StringConcatHelper.simpleConcat`
>> was that by using the primitives used by the `StringConcatFactory` as
>> straightforwardly as possible the method acts as a documentation-of-sorts or
>> guide to
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with two additio
On Fri, 19 Jul 2024 22:28:40 GMT, Claes Redestad wrote:
>> Shaojin Wen has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Update src/java.base/share/classes/java/lang/String.java
>>
>>Co-authored-by: Chen Liang
>> - add comments
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with two additio
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with two additio
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with two additio
On Fri, 19 Jul 2024 21:33:09 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
> Currently simpleConcat is implemented using mix and prepend, but in this
> simple scenario, it can be implemented in a simpler way and can improve
> performance.
Shaojin Wen has updated the pull request incrementally with two additional
commits since the last revision:
- Update src/java.bas
On Fri, 19 Jul 2024 21:34:36 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
> Currently simpleConcat is implemented using mix and prepend, but in this
> simple scenario, it can be implemented in a simpler way and can improve
> performance.
Shaojin Wen has updated the pull request incrementally with one additional
commit since the last revision:
handle null argument
> Currently simpleConcat is implemented using mix and prepend, but in this
> simple scenario, it can be implemented in a simpler way and can improve
> performance.
Shaojin Wen has updated the pull request incrementally with one additional
commit since the last revision:
extract a common doCo
On Fri, 19 Jul 2024 19:18:43 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Fri, 19 Jul 2024 20:43:42 GMT, Chen Liang wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> share newArray
>
> As annoying and risky as this first appeared, this patch is actually in quite
> good shape: The usage
On Fri, 19 Jul 2024 20:18:04 GMT, Chen Liang wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> share newArray
>
> src/java.base/share/classes/java/lang/StringConcatHelper.java line 371:
>
>> 369: return n
On Fri, 19 Jul 2024 20:55:03 GMT, Shaojin Wen wrote:
>> src/java.base/share/classes/java/lang/StringConcatHelper.java line 371:
>>
>>> 369: return new String(s1);
>>> 370: }
>>> 371: byte coder = (byte) (s1.coder() | s2.coder());
>>
>> Suggestion:
>>
>> int
On Fri, 19 Jul 2024 19:18:43 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Fri, 19 Jul 2024 19:18:43 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
On Fri, 19 Jul 2024 17:35:45 GMT, Chen Liang wrote:
> Also beware of #19927: it simplifies the prepend part. How does that patch
> run in your benchmark?
The performance comparison I made is based on the latest master branch
([c25c4896ad9ef031e3cddec493aef66ff87c48a7](https://github.com/openjd
On Fri, 19 Jul 2024 19:18:43 GMT, Shaojin Wen wrote:
>> Currently simpleConcat is implemented using mix and prepend, but in this
>> simple scenario, it can be implemented in a simpler way and can improve
>> performance.
>
> Shaojin Wen has updated the pull request incrementally with one additio
> Currently simpleConcat is implemented using mix and prepend, but in this
> simple scenario, it can be implemented in a simpler way and can improve
> performance.
Shaojin Wen has updated the pull request incrementally with one additional
commit since the last revision:
share newArray
-
On Fri, 19 Jul 2024 13:10:43 GMT, Shaojin Wen wrote:
> Currently simpleConcat is implemented using mix and prepend, but in this
> simple scenario, it can be implemented in a simpler way and can improve
> performance.
Changes requested by liach (Reviewer).
src/java.base/share/classes/java/lang
On Fri, 19 Jul 2024 13:10:43 GMT, Shaojin Wen wrote:
> Currently simpleConcat is implemented using mix and prepend, but in this
> simple scenario, it can be implemented in a simpler way and can improve
> performance.
Also beware of #19927: it simplifies the prepend part. How does that patch ru
On Fri, 19 Jul 2024 13:10:43 GMT, Shaojin Wen wrote:
> Currently simpleConcat is implemented using mix and prepend, but in this
> simple scenario, it can be implemented in a simpler way and can improve
> performance.
Below are the performance numbers running on a MacBook M1 Pro, which is 8.71%
47 matches
Mail list logo