Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 17 May 2013 - 07:05 PM

IIRC, the algorithmic performance guarantees of std::sort are the same as quicksort.

As for the performance difference, it's likely got nothing to do with algorithms, but realities of hardware. The CPU cache likes vectors and hates lists ;)
I imagine that if you run your code through a profiler and check the number of cache misses between the two sorting functions, it would go a long way to explaining the discrepancy.

#1Hodgman

Posted 17 May 2013 - 07:04 PM

IIRC, the algorithmic performance guarantees in std::sort are the same as quicksort.

As for the if performance difference, it's likely got nothing to do with algorithms, but realities of hardware. The CPU cache likes vectors and hates lists ;)
I imagine that if you run your code through a profiler and check the number of cache misses between the two sorting functions, it would go a long way to explaining the discrepancy.

PARTNERS