Will dividing a long String by + make a difference in performance?

Just like the title.

In Swift, when you have a single long String like this:

let description = "title - \(myItem.title) subtitle - \(myItem.subtitle) text - \(myItem.text) price - \(myItem.price)"

For readability, we break it down like this:

let description = "title - \(myItem.title) " +
"subtitle - \(myItem.subtitle) " +
"text - \(myItem.text) " +
"price - \(myItem.price)"

Because it is an example, there are only about 4 pieces divided, but in actual use, there may be dozens of pieces, You may end up calling this code hundreds of times.

Will there be any performance impact (speed, memory footprint, memory allocation and deallocation, etc.)?

Or will it do something smarter at the compile stage?

I tested repeating 1 000 000 times. No performance difference.

Even if the performance is the same, you may find the multiline literal style easier to read:

let description = """
    title - \(myItem.title) \
    subtitle - \(myItem.subtitle) \
    text - \(myItem.text) \
    price - \(myItem.price)
    """
Will dividing a long String by + make a difference in performance?
 
 
Q