RFR: Optimize StringBuilder.append(null)

Remi Forax forax at univ-mlv.fr
Wed Mar 27 23:36:14 UTC 2013


On 03/27/2013 03:01 AM, Martin Buchholz wrote:

Hi Martin,
the code looks good,
I've just noticed that you declare the char array value final in appendNull
but it's not something that is usually done in the java.lang codebase.

Rémi

> Oops: I forgot to include core-libs-dev
>
> Forwarded conversation
> Subject: RFR: Optimize StringBuilder.append(null)
> ------------------------
>
> From: *Martin Buchholz* <martinrb at google.com>
> Date: Tue, Mar 26, 2013 at 1:54 PM
> To: Xueming Shen <xueming.shen at oracle.com>, Masayoshi Okutsu <
> masayoshi.okutsu at oracle.com>, Ulf Zibis <Ulf.Zibis at cosoco.de>, Mike Duigou <
> mike.duigou at oracle.com>
>
>
> Hi! It's me again, fiddlling with StringBuilder.
> One of our users noticed that a lot of CPU time was being spent in
> StringBuilder.append(null).
> We can apply the previously proven optimization that improves it by a
> factor of 2 on microbenchmarks.
>
> http://cr.openjdk.java.net/~martin/webrevs/openjdk8/StringBuilder.appendNull/
>
> ----------
> From: *Mike Duigou* <mike.duigou at oracle.com>
> Date: Tue, Mar 26, 2013 at 1:58 PM
> To: Martin Buchholz <martinrb at google.com>
> Cc: Xueming Shen <xueming.shen at oracle.com>, Masayoshi Okutsu <
> masayoshi.okutsu at oracle.com>, Ulf Zibis <Ulf.Zibis at cosoco.de>
>
>
> This looks fine to me. Do you need a bug number?
>
> Mike
>
> ----------
> From: *Martin Buchholz* <martinrb at google.com>
> Date: Tue, Mar 26, 2013 at 2:02 PM
> To: Mike Duigou <mike.duigou at oracle.com>
> Cc: Xueming Shen <xueming.shen at oracle.com>, Masayoshi Okutsu <
> masayoshi.okutsu at oracle.com>, Ulf Zibis <Ulf.Zibis at cosoco.de>
>
>
>
>
>
> On Tue, Mar 26, 2013 at 1:58 PM, Mike Duigou <mike.duigou at oracle.com> wrote:
>
>> This looks fine to me. Do you need a bug number?
>>
>>
> Yes, I do (thanks!)
>
> ----------
> From: *Mike Duigou* <mike.duigou at oracle.com>
> Date: Tue, Mar 26, 2013 at 2:12 PM
> To: Martin Buchholz <martinrb at google.com>
> Cc: Xueming Shen <xueming.shen at oracle.com>, Masayoshi Okutsu <
> masayoshi.okutsu at oracle.com>, Ulf Zibis <Ulf.Zibis at cosoco.de>, Jim Gish <
> jim.gish at oracle.com>
>
>
> I have created:
>
> JDK-8010849: (str) Optimize StringBuilder.append(null)
>
> (yes we know that requiring an Oracle engineer create the bug is a problem.
> SOON!)
>
> Mike
>
> ----------
> From: *Mike Duigou* <mike.duigou at oracle.com>
> Date: Tue, Mar 26, 2013 at 6:57 PM
> To: Martin Buchholz <martinrb at google.com>
>
>
> Hi Martin;
>
> I hadn't originally noticed but can you make sure to send a RFR through
> core-libs-dev for this issue?
>
> Mike




More information about the core-libs-dev mailing list