Hi,
I've seen several examples from different languages that unambiguously prove that joining elements of a list(array) is times faster that just concatenating string. Unfortunately I didn't find an explanation why? Can someone explain the inner algorithm that works under both operations and why is the one faster than another.
Here is a python example of what I mean:
# This is slow
x = 'a'
x += 'b'
...
x += 'z'
# This is fast
x = ['a', 'b', ... 'z']
x = ''.join(x)
Thank is advance )