String concatenation tweaks
Aleksey Shipilev
aleksey.shipilev at oracle.com
Fri May 22 08:29:43 UTC 2015
On 22.05.2015 10:59, Rémi Forax wrote:
> Nice patch. I think you don't need to generate an inner class because
> you can use MethodHandles.foldArguments with a combiner that
> calculate the size and a target method that calls StringBuilder::new
> and append on each argument. I will write a code example for that
> during the week end.
Thanks Remi!
Yes, inner classes seem to be the necessary evil when you need to
generate "just" a single method. Our saving grace here is that we only
need to do this for one "shape" of concat, and there are seem to be only
handful in a given application. I agree that doing that purely on MHs
would be cleaner, but I have my doubts about the performance of it.
Let's see!
-Aleksey.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20150522/4ac14c39/signature.asc>
More information about the compiler-dev
mailing list