Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Complex (Several Types)

The next results are obtained from more complex benchmarks, not include in the library because they use non free SW (If you are interested in the details, contact fjtapia@gmail.com)

There are 3 types of benchmarks,

  • 64 bits integers
  • strings
  • objects of several sizes.

The objects are arrays of integers. The heavy comparison sums all the elements in each, and the light comparison uses only the first number of the array.

100 000 000 Numbers of 64 bits Randomly Filled

                      |              |              |
                      |              |   Maximum    |
                      | Time ( secs) | Memory Used  |
----------------------+--------------+--------------+
 std::sort            |    12.381    |     783 MB   |
 pdqsort              |     9.760    |     783 MB   |
                      |              |              |
 std::stable_sort     |    13.311    |    1174 MB   |
 spinsort             |    11.541    |    1174 MB   |
 flat_stable_sort     |    13.664    |     787 MB   |
 spreadsort           |     8.507    |     783 MB   |
                      |              |              |

10 000 000 Strings Randomly Filled

                      |              |              |
                      |              |   Maximum    |
                      | Time ( secs) | Memory Used  |
----------------------+--------------+--------------+
 std::sort            |    9.658     |     885 MB   |
 pdqsort              |   15.247     |    1605 MB   |
                      |              |              |
 std::stable_sort     |   19.753     |    1041 MB   |
 spinsort             |   17.596     |    1041 MB   |
 flat_stable_sort     |   19.159     |     887 MB   |
 spreadsort           |    5.221     |     885 MB   |
                      |              |              |

Objects Randomly Filled

The objects are arrays of 64 bits numbers

They are compared in two ways :

(H) Heavy : The comparison is the sum of all the numbers of the array.

(L) Light : The comparison is using only the first element of the array, as a key

                 |           |           |           |           |           |           |             |
                 | 100000000 |  50000000 |  25000000 |  12500000 |   6250000 |   1562500 |             |
                 | objects of| objects of| objects of| objects of| objects of| objects of|   Maximum   |
                 |  8 bytes  | 16 bytes  | 32 bytes  | 64 bytes  | 128 bytes | 512 bytes |   Memory    |
                 |           |           |           |           |           |           |   Used      |
                 |  H     L  |  H     L  |  H     L  |  H     L  |  H     L  |  H     L  |             |
-----------------+-----------+-----------+-----------+-----------+-----------+-----------+-------------+
std::sort        |11.86 12.00| 6.53  6.10| 3.85  3.21| 2.79  1.97| 3.17  1.37| 2.04  1.30|    783 MB   |
pdqsort          |  9.80 9.39| 5.39  4.98| 3.11  2.51| 2.14  1.61| 2.50  1.10| 1.92  1.03|    783 MB   |
                 |           |           |           |           |           |           |             |
std::stable_sort |12.91 13.58| 7.73  7.32| 5.16  4.52| 4.22  3.67| 4.31  3.18| 3.46  2.89|   1174 MB   |
spinsort         |11.58 11.37| 6.88  6.40| 4.43  3.76| 3.58  3.06| 3.84  2.41| 2.76  2.17|   1174 MB   |
flat_stable_sort |13.31 13.87| 8.35  7.83| 5.32  4.46| 4.16  3.14| 3.63  2.27| 2.67  2.13|    787 MB   |
spreadsort       | 8.37  8.37| 6.51  6.62| 3.72  3.16| 2.75  1.69| 2.56  1.20| 1.38  0.80|    783 MB   |
                 |           |           |           |           |           |           |             |


PrevUpHomeNext