Let's try again, with a more C++14 like solution:
sort(v.begin(),v.end(),[](const auto x, const auto y) { return *x > *y; });
instead of your line 39: sort(v.begin(),v.end(),[](const string *x, const string *y) { return *x > *y; });
Some results:• g++ 4.9.2 with O3 qsort 545ms, sort 7289ms
• clang with O3 and libc++ qsort 551ms, sort 844ms
I've used:
clang++ -std=c++1y -stdlib=libc++ -O3 test.cpp
and g++-4.9.2 -std=c++14 -O3 test.cpp