String concatenation tweaks

Aleksey Shipilev aleksey.shipilev at oracle.com
Thu Jun 4 11:56:51 UTC 2015


On 06/04/2015 02:50 PM, Maurizio Cimadamore wrote:
> So, if I parse correctly, it seems that either FULL_MH and
> NAIVE_MH_FILTER_SIZED wins on large size, but are considerably slower at
> lower sizes. On the other hand, INNER_SIZED seems like the best across
> the board?

Yup, except for a tiny thing on size=1:

# BASELINE
ConcatBench.string_string_long:  32.095 ±    0.374   ns/op

# INNER
ConcatBench.string_string_long:  32.233 ±    0.276   ns/op

# INNER_SIZED:
ConcatBench.string_string_long:  45.854 ±    0.729   ns/op

That's a price you pay for redundantly computing the final length, when
the default length (16) is enough.

Thanks,
-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/20150604/ff6ce905/signature.asc>


More information about the compiler-dev mailing list