Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling g++/clang files takes longer than on Gvim/cmd #1413

Closed
ghost opened this issue Jun 21, 2017 · 0 comments
Closed

Compiling g++/clang files takes longer than on Gvim/cmd #1413

ghost opened this issue Jun 21, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 21, 2017

Hi,

Most probably its my fault, but why its talkes longer to compile a single g++ file on cmder/vim than on gvim/cmd?

Commands used to compile:

g++ -std=c++14 -Wall -Wextra -pedantic chapter.4.6.3.cpp -o chapter.4.6.3.exe

and
clang++ -std=c++14 -Wall -Wextra -pedantic chapter.4.6.3.cpp -o chapter.4.6.3.exe

Source file


#include "std_lib_facilities.h"

//------------------------------------------------------------------------------

// simple dictionary: list of sorted words:
int main()
{
    vector<string> words; 
    string temp;
    while (cin>>temp)                // read whitespace separated words
        words.push_back(temp);       // put into vector

    cout << "Number of words: " << words.size() << endl;

    sort(words.begin(),words.end()); // sort "from beginning to end"

    for (int i = 0; i< words.size(); ++i) 
        if (i==0 || words[i-1]!=words[i]) // is this a new word?
            cout << words[i] << "\n"

github source

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant