http://cr.openjdk.java.net/~martin/webrevs/openjdk7/Formatter.parse/
Synopsis: Optimize Formatter.parse (including String.printf)
Description:
Formatter is not as efficient as it could be.
Here's a low-hanging fruit optimization
that creates fewer objects,
and uses the idiom
return al.toArray(new FormatString[al.size()]);
I'm sure additional optimizations are possible.
Results: about 10-20% faster on in-house microbenchmarks of
String.printf
Martin
Synopsis: Optimize Formatter.parse (including String.printf)
Description:
Formatter is not as efficient as it could be.
Here's a low-hanging fruit optimization
that creates fewer objects,
and uses the idiom
return al.toArray(new FormatString[al.size()]);
I'm sure additional optimizations are possible.
Results: about 10-20% faster on in-house microbenchmarks of
String.printf
Martin
- relates to
-
JDK-8050142 Optimize java.util.Formatter
- Resolved