Optimize Formatter.parse (including String.printf)
Xueming.Shen at Sun.COM
Wed Nov 4 11:54:22 PST 2009
I will take a look.
The bugid# is 6898220.
Martin Buchholz wrote:
> Hi Sherman,
> I'd like you to do a code review.
> Synopsis: Optimize Formatter.parse (including String.printf)
> 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
More information about the core-libs-dev