Integrated: 8263038: Optimize String.format for simple specifiers

Claes Redestad redestad at openjdk.java.net
Mon Mar 8 23:18:11 UTC 2021


On Thu, 4 Mar 2021 17:20:40 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> This patch optimizes String.format expressions that uses trivial specifiers. In the JDK, the most common variation of String.format is a variation of format("foo: %s", s), which gets a significant speed-up from this.
> 
> Various other cleanups and minor improvements reduce overhead further and ensure we get a small gain also for more complex format strings.

This pull request has now been integrated.

Changeset: f71b21b0
Author:    Claes Redestad <redestad at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/f71b21b0
Stats:     281 lines in 2 files changed: 126 ins; 58 del; 97 mod

8263038: Optimize String.format for simple specifiers

Reviewed-by: rriggs, naoto

-------------

PR: https://git.openjdk.java.net/jdk/pull/2830


More information about the core-libs-dev mailing list