RFR [8051382] Optimize java.lang.reflect.Modifier.toString()

Ivan Gerasimov ivan.gerasimov at oracle.com
Sat Jul 19 01:18:16 UTC 2014

On 19.07.2014 3:07, Martin Buchholz wrote:
> I took a quick look at StringJoiner.  It looks to me like this won't 
> be an optimization, because StringJoiner uses StringBuilder 
> internally, and will actually perform more total operations.

Unfortunately this is true.
Microbenchmarking shows that StringJoiner makes the things 30% slower, 
which is sad.

Then I propose another simple patch giving +15% to the speed:


Sincerely yours,

More information about the core-libs-dev mailing list