RFR: 8215412: Optimize PrintStream.println methods

Roger Riggs Roger.Riggs at oracle.com
Fri Jan 4 15:38:06 UTC 2019


Hi Claes,

The logic looks fine, but the 'internal' field name doesn't mean anything
and there's no description of the optimization.

The field could be renamed:  noOverride or notOverridden or noDoubleSync 
or ...
or add a comment to the field describing its purpose.

Update copyright date on PrintStream.java.

Thanks, Roger

On 01/02/2019 03:44 AM, Claes Redestad wrote:
> Hi,
>
> new webrev:
>
>  http://cr.openjdk.java.net/~redestad/8215412/jdk.02/
>
> - Adds a forgotten String.valueOf in println(String), making sure all
> methods are semantically the same for
> - Remove the isInternal method and use only exact match with
> PrintStream.class to determine whether to use the optimized paths.
>
> As before:
>
> On 2018-12-14 21:22, Claes Redestad wrote:
>> Same performance characteristics in the simple tests I've used to
>> verify this, and no measurable regression (but no speed-up) for classes
>> overriding PrintStream.
>
> I've withdrawn the related CSR, since it's not relevant for this
> implementation as it doesn't observably alter behavior of types
> inheriting from PrintStream.
>
> Thanks!
>
> /Claes



More information about the core-libs-dev mailing list