create string by concatenating the results of $a[a.indices].
This uses a growing array if further strings are appended using 'infix +', so it avoids quadratic runtime caused if each 'infix +' would create its own concatenation-string.
The performance of creating a string a0+a1+a2+...+a<n> is in O(n) since the backing array is shared and doubled in size when full (so the final array size is less than 2n in size and the sum of all arrays is less than 4n = 2n + n + n/2+n/4+...).
The performance of iterating the utf8 bytes of a string is O(l+n) for an array of length l created by concatenating n sub-strings.
This uses a growing array if further strings are appended using 'infix +',
so it avoids quadratic runtime caused if each 'infix +' would create its
own concatenation-string.
The performance of creating a string a0+a1+a2+...+a<n> is in O(n) since the
backing array is shared and doubled in size when full (so the final array size
is less than 2n in size and the sum of all arrays is less than 4n = 2n + n +
n/2+n/4+...).
The performance of iterating the utf8 bytes of a string is O(l+n) for an
array of length l created by concatenating n sub-strings.