Boost.Sort
constants.hpp
Go to the documentation of this file.
1 //constant definitions for the Boost Sort library
2 
3 // Copyright Steven J. Ross 2001 - 2014
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 
8 // See http://www.boost.org/libs/sort for library home page.
9 #ifndef BOOST_SORT_SPREADSORT_DETAIL_CONSTANTS
10 #define BOOST_SORT_SPREADSORT_DETAIL_CONSTANTS
11 namespace boost {
12 namespace sort {
13 namespace detail {
14 //Tuning constants
15 //This should be tuned to your processor cache;
16 //if you go too large you get cache misses on bins
17 //The smaller this number, the less worst-case memory usage.
18 //If too small, too many recursions slow down spreadsort
19 enum { max_splits = 11,
20 //It's better to have a few cache misses and finish sorting
21 //than to run another iteration
23 //Sets the minimum number of items per bin.
25 //Used to force a comparison-based sorting for small bins, if it's faster.
26 //Minimum value 1
28 //This is the minimum split count to use spreadsort when it will finish in one
29 //iteration. Make this larger the faster std::sort is relative to integer_sort.
31 //Sets the minimum number of items per bin for floating point.
33 //Used to force a comparison-based sorting for small bins, if it's faster.
34 //Minimum value 1
36 //This is the minimum split count to use spreadsort when it will finish in one
37 //iteration. Make this larger the faster std::sort is relative to float_sort.
39 //There is a minimum size below which it is not worth using spreadsort
40 min_sort_size = 1000 };
41 }
42 }
43 }
44 #endif
Definition: constants.hpp:11
Definition: constants.hpp:22
Definition: constants.hpp:19
Definition: constants.hpp:40
Definition: constants.hpp:24