This is often asked question if Google search is to be believed...
I have done some research on the topic of performance best practices in Rust for workloads where there is a lot of String/str concatenation is involved.
Some of the material I found appears to be relatively old, in Rust age terms, 3-5+ years ago.
Perhaps it is still valid?
Some of what I found looks interesting: here is one example
One thing for sure - there is a lot of ways of handling String concatenation in Rust which means there is a lot of chances for writing relatively poorly performing code that uses a lot of memory.
So now with Rust 1.50+ version in mind, can anyone offer some wisdom on how to code in Rust if you need to build and concatenate a lot of String variables - focus on performance and memory consumption.
A couple of use-cases I have are (1) processing very large text files - ASCII and UTF-8 and (2) building a lot of Strings to pass as parameters to calls to HTTPS/REST-API crates.
I am sure there are others too.
If I have missed a good resource to help me with this topic, please link as a reply here.
Many thanks for your wisdom