C++ native arrays. Exciting subject by no means. Where the key and unique to C++ is the concept of the native array reference. A central concept to C++ native array handling.
If you agree with this statement, you are perhaps in one of the two opposing factions of the church of c++. Therefore, I can further deduce, you believe in A or B:
Native array references are an implementation of the god’s will
Special care must be taken to exorcise, all native array references
Or as a sober alternative, you refuse to take sides? Then perhaps it might interest you, I have done and I am indeed using in my code, two different, but conceptually the same C++ utilities to easier use and manage native arrays.
The first abstraction is dbj::ARH, or Array Helper abbreviated. The post is here. (updated)
Standard C++ string stores its data on the heap. But that is only true if the string grows over an implementation-dependent size. That predefined size for std::string is/was 15 for MSVC and GCC and 23 for Clang. That is: C++ string stays “small”, if you have not asked for bigger than 15/23 sized strings. The string will not attempt to grow its storage on the heap if it can stay small.
Heap memory allocations/de-allocations are taking a lot of time when compared to most standard C run time calls.