René and Jameson , thank you very much for your answers, For completeness here one more test by incrementally building a large string.
function f4(strings)
buf = ""
for s in strings
buf *= s
end
buf
end
# @time f4(strings);
# I'm yet waiting for result! => Ctl-c
@time f4(strings[1:10_000]);
# elapsed time: 0.43980588 seconds (401020144 bytes allocated, 78.57% gc
time)
@time f4(strings[1:100_000]);
# elapsed time: 48.910219384 seconds (40008864504 bytes allocated,
66.90% gc time)
