RFR  Optimize java.lang.reflect.Modifier.toString()
ivan.gerasimov at oracle.com
Mon Aug 4 11:27:31 UTC 2014
Sorry for the pause, I had to take a break.
Thank you for your StringJoiner rework!
I created a bug to track it:
With your implementation of StringJoiner, the first version of
Modifier.toString()  became (almost) as fast as original, and a bit
Will you approve the change to Modifier.toString?
On 19.07.2014 19:58, Martin Buchholz wrote:
> StringJoiner seems written in a style suitable for an application, not
> in a low-level performance-oriented style suitable for a JDK core
> library. But we can fix that.
> On Fri, Jul 18, 2014 at 6:18 PM, Ivan Gerasimov
> <ivan.gerasimov at oracle.com <mailto:ivan.gerasimov at oracle.com>> wrote:
> 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
> 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