Optimize String Manipulation

The handling of string operations can affect the performance of your program.

Strings are read-only by default. Placing strings into read-only memory allows for certain types of optimizations and also causes the compiler to put out only one copy of strings that are used in more than one place. If you use the intrinsic string functions, the compiler can better optimize them if it knows that any string literals it is operating on will not be changed.

Note: You can explicitly set strings to read-only by using #pragma strings (readonly) in your source files or the /qro compiler option to avoid changing your source files.



Overview of Optimization


Optimize Your Application