Comparison of number sorting algorithms in C++