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 a snapshot of the develop branch, built from commit f1aed1ddda.
PrevUpHomeNext

Complex (Several Types)

The next results are obtained from more complex benchmarks, not include in the library because they use non free software (If you are interested in their code, 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

                    |         |             |
                    |  Time   |   Maximum   |
                    |  secs   | Memory Used |
--------------------+---------+-------------+
 std::sort          |  8.2154 |     784 MB  |
 pdqsort            |  3.9356 |     784 MB  |
                    |         |             |
 std::stable_sort   |  8.5016 |    1176 MB  |
 spinsort           |  9.4262 |    1175 MB  |
 flat_stable_sort   | 10.6790 |     788 MB  |
 spreadsort         |  4.2248 |     785 MB  |
                    |         |             |

10 000 000 Strings Randomly Filled

                    |         |             |
                    |  Time   |   Maximum   |
                    |  secs   | Memory Used |
--------------------+---------+-------------+
 std::sort          |  6.2442 |    822 MB   |
 pdqsort            |  6.6661 |    821 MB   |
                    |         |             |
 std::stable_sort   | 12.2620 |   1134 MB   |
 spinsort           |  8.5996 |    978 MB   |
 flat_stable_sort   |  9.2559 |    978 MB   |
 spreadsort         |  2.4323 |    822 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        | 8.25  8.26| 4.46  4.23| 2.67  2.33| 2.10  1.45| 1.72  1.11| 1.13  0.76|    786 MB   |
pdqsort          | 8.17  8.17| 4.42  4.11| 2.57  2.26| 1.78  1.37| 1.46  1.06| 0.97  0.70|    786 MB   |
                 |           |           |           |           |           |           |             |
std::stable_sort |10.28 10.25| 5.57  5.24| 3.68  3.26| 2.97  2.59| 2.60  2.46| 2.38  2.29|   1177 MB   |
spinsort         | 9.70  9.69| 5.25  4.89| 3.28  2.65| 2.41  1.92| 2.03  1.66| 1.66  1.52|   1176 MB   |
flat_stable_sort |10.75 10.73| 6.44  5.99| 4.36  3.71| 3.59  2.86| 3.04  2.11| 1.64  1.45|    789 MB   |
spreadsort       | 5.10  5.10| 3.79  4.18| 2.22  1.88| 1.58  1.11| 1.51  0.99| 0.74  0.53|    786 MB   |
                 |           |           |           |           |           |           |             |


PrevUpHomeNext