RFR: 8222852: Reduce String concat combinator tree shapes by folding constants into prependers

Claes Redestad claes.redestad at oracle.com
Tue Apr 23 11:05:30 UTC 2019


by folding a constant prepend followed by an argument prepend into a
single prepender with the constant bound in, we significantly reduce
the amount of possible MH shapes that the String concat bootstrap
method can generate by sharing the stem of the combinator tree
between similar concatenations like '"foo" + obj + obj' and
'obj + "foo" + obj'.

See bug for details and the outline of a proof that this turns an
exponential growth factor into a constant one.

Bug:    https://bugs.openjdk.java.net/browse/JDK-8222852
Webrev: http://cr.openjdk.java.net/~redestad/8222852/open.00/

Testing: tier1-3, verified retained throughput performance in
microbenchmarks, verified significant startup and footprint improvements
for both realistic and synthetically complex combinations of argument



More information about the core-libs-dev mailing list