3 ms·
std::sort was about twice as fast (!!) last time I ran my benchmark. I don't think std::sort would be slower than a macro based liberty. Obviously, you can re
by petters 10y ago
std::sort was about twice as fast (!!) last time I ran my benchmark.
I don't think std::sort would be slower than a macro based liberty.
Obviously, you can reserve memory in a vector in the beginning.
> If an algorithm is time-critical then almost by definition the generic implementation in standard library won't be enough.
I'm afraid I'll have to disagree here as well.
- petters 10y agoReran the std::sort vs. qsort benchmark: Visual Studio 2015: 1.79x WSL gcc 6.2: 1.92x WSL clang 3.8.0: 2.08x Ubuntu 16.10 VM gcc 6.2: 1.68x Ubuntu 16.10 VM clang 3.8.1: 1.89x All in favor of std::sort.