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

Benchmark

The benchmark with 100000000 64 bits integers, comparing with the std::stable_sort of the GCC 6.3 compiler shows the mentioned characteristics, running on a Intel i7-5820K CPU @ 3.30GH .

Data                           |std::stable_sort |   spin_sort  |
-------------------------------+-----------------+--------------+
random                         |     8.62        |     9.73     |
                               |                 |              |
sorted                         |     4.88        |     0.06     |
sorted + 0.1% end              |     4.92        |     0.41     |
sorted +   1% end              |     4.97        |     0.55     |
sorted +  10% end              |     5.73        |     1.32     |
                               |                 |              |
sorted + 0.1% middle           |     6.58        |     1.89     |
sorted +   1% middle           |     7.06        |     2.12     |
sorted +  10% middle           |     9.56        |     4.02     |
                               |                 |              |
reverse sorted                 |     0.13        |     0.14     |
reverse sorted + 0.1% end      |     5.22        |     0.52     |
reverse sorted +   1% end      |     5.29        |     0.66     |
reverse sorted +  10% end      |     6.03        |     1.45     |
                               |                 |              |
reverse sorted + 0.1% middle   |     6.52        |     1.89     |
reverse sorted +   1% middle   |     7.09        |     2.12     |
reverse sorted +  10% middle   |     9.46        |     4.02     |
                               |                 |              |
-------------------------------+-----------------+--------------+


PrevUpHomeNext