RFR: 8263038: Optimize String.format for simple specifiers [v3]

Claes Redestad redestad at openjdk.java.net
Mon Mar 8 18:52:19 UTC 2021


> 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.

Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:

  Use a BOM as a sentinel for uninitialized zero

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2830/files
  - new: https://git.openjdk.java.net/jdk/pull/2830/files/834450dc..c0a7f911

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2830&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2830&range=01-02

  Stats: 8 lines in 1 file changed: 2 ins; 0 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2830.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2830/head:pull/2830

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


More information about the core-libs-dev mailing list