Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define TXT1 "The", "cmake", "gui", "executable", "is", "the", "CMake", "GUI", "Project", "configuration", "settings"
- #define TXT2 "The cmake-gui executable is the CMake GUI.", "Project configuration settings may be specified interactively.Brief instructions are provided at the bottom of the window when the program is running." , "CMake is a cross-platform build system generator.", "Projects specify their build process with platform - independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt.", "Users build a project by using CMake to generate a build system for a native tool on their platform."
- #define TXT TXT2
- int main()
- {
- using namespace std;
- const int LOOPS = 10000;
- {
- cout << "concat_string: ";
- Stopwatch sw;
- for (int i = LOOPS; i > 0; --i)
- {
- string s = concat_string(TXT);
- }
- }
- {
- cout << "append new vector: ";
- Stopwatch sw;
- for (int i = LOOPS; i > 0; --i)
- {
- string s;
- vector<char*> arr = {TXT};
- for (auto str : arr)
- {
- s += str;
- }
- }
- }
- {
- cout << "append preallocated vector: ";
- Stopwatch sw;
- vector<char*> arr = {TXT};
- for (int i = LOOPS; i > 0; --i)
- {
- string s;
- for (auto str : arr)
- {
- s += str;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement