String concatenation tweaks

Aleksey Shipilev aleksey.shipilev at
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:

ConcatBench.string_string_long:  32.095 ±    0.374   ns/op

ConcatBench.string_string_long:  32.233 ±    0.276   ns/op

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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the compiler-dev mailing list