The one caveat to this is that it's relatively easy to do large amounts of dynamic memory allocation/copying in C++ which can run worse than a scripted language. Especially if you std::shared_ptr all the things, or do lots of things with std::string.
I wrote a parsing algorithm in Java and C++, and the Java one was absurdly faster than the C++ one at one point because I was using std::vectors all over the place, so any time I needed to store an attribute in one of those it was doing memory allocation that was way slower than Java's memory allocation and I wasn't getting a lot of the benefit of C++ because of the memory indirections being similar to the Java version. Similarly doing a lot of += with std::strings will utterly destroy your performance due to all the allocations, deallocations, and copying.
Expanding on strings a bit more: There's a really interesting attribute of a language like C++ versus one that has a GC and immutable strings. Because the memory lifetime is managed for you in a GCed language, there is effectively no need to actually copy string memory when handing it off to other libraries. Counter to that, because libraries have no idea what the lifetime of a string will be in C++, they effectively always have to copy strings in order to not have huge memory bugs. This actually leads to more performant code in the GCed language in this specific case due to there being less copying, without having some way to either modify the source of the other library or tell it in some way that the lifetime of the memory will always be good when it wants to access it. I think Rust lifetimes allow for similar optimization because it shouldn't compile if the memory gets deallocated while something else has a reference to it. Just an interesting observation I noticed a little while ago when working on heavy string processing code.