• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[/===========================================================================
2 Copyright (c) 2017 Steven Ross, Francisco Tapia, Orson Peters
3
4
5 Distributed under the Boost Software License, Version 1.0
6 See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt
8=============================================================================/]
9
10[section:windows_single 2.6.- Windows Benchmarks]
11
12[:
13This library contains a benchmark folder with programs to measure the speed of the algorithms on your machine and operating system.
14These are short benchmarks to test speed with different kinds of data ( random, sorted, sorted plus unsorted append at end ...)
15
16The benchmark runs over a VirtualBox virtual machine with 8 threads and 16 GB of RAM,
17running over a Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz with 6 cores and 2 threads by core, and 15M of cache.
18
19The Operating System is Windows 10 64 bits, and the compiler is VC2017
20]
21
22[section:near_sorted Near Sorted Data]
23[:
24[h4[_Near Sorted Data With 100 000 000 64 bits Integers]]
25
26benchmark/single/benchmark_numbers.cpp : This benchmark shows the results obtained with several kind of integers numbers (random, and near
27sorted).
28
29The benchmarks with strings and objects of different sizes are not showed here, but you can obtain running the benchmark_strings.cpp ans benchmarks_objects.cpp programs.
30
31[*[teletype]
32``
33                                |           |           |           |           |           |           |
34                                |           |           |std::      |           |flat_      |           |
35                                | std::sort | pdqsort   |stable_sort| spin_sort |stable_sort|spreadsort |
36    ----------------------------+-----------+-----------+-----------+-----------+-----------+-----------+
37    random                      |  11.74    |   9.40    |  13.42    |  12.12    |  13.17    |   7.10    |
38                                |           |           |           |           |           |           |
39    sorted                      |   1.93    |   0.16    |   4.43    |   0.12    |   0.09    |   0.09    |
40    sorted + 0.1% end           |   3.54    |   2.08    |   4.39    |   0.87    |   0.48    |   5.87    |
41    sorted +   1% end           |   4.52    |   2.77    |   4.82    |   1.12    |   1.00    |   7.20    |
42    sorted +  10% end           |   9.69    |   5.99    |   7.40    |   2.21    |   2.29    |   8.59    |
43                                |           |           |           |           |           |           |
44    sorted + 0.1% middle        |   3.66    |   2.43    |   4.74    |   2.63    |   3.84    |   5.59    |
45    sorted +   1% middle        |   4.36    |   3.04    |   4.97    |   4.35    |   6.21    |   9.20    |
46    sorted +  10% middle        |   9.50    |   7.28    |   7.44    |   5.37    |   8.03    |   9.95    |
47                                |           |           |           |           |           |           |
48    reverse sorted              |   2.38    |   0.35    |   5.61    |   0.24    |   0.18    |   2.84    |
49    reverse sorted + 0.1% end   |   4.24    |   2.64    |   5.72    |   0.96    |   0.67    |   6.66    |
50    reverse sorted +   1% end   |   4.44    |   2.67    |   5.22    |   1.10    |   0.86    |   5.68    |
51    reverse sorted +  10% end   |   6.93    |   4.98    |   6.27    |   2.00    |   1.95    |   7.37    |
52                                |           |           |           |           |           |           |
53    reverse sorted + 0.1% middle|   4.63    |   3.18    |   5.76    |   3.18    |   5.22    |   7.52    |
54    reverse sorted +   1% middle|   4.38    |   3.06    |   4.94    |   3.10    |   4.54    |   6.55    |
55    reverse sorted +  10% middle|   9.20    |   7.08    |   7.56    |   5.28    |   7.40    |   9.04    |
56                                |           |           |           |           |           |           |
57
58``
59]
60]
61[endsect]
62
63[section:complex_benchmarks Complex (Several Types)]
64[:
65The next results  are obtained from more complex benchmarks, not include in the library because they use non free SW
66(If you are interested in the details, contact fjtapia@gmail.com)
67
68There are 3 types of benchmarks,
69[:
70*64 bits integers
71
72*strings
73
74*objects of several sizes.
75
76The 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.
77
78]
79[h4[_100 000 000 Numbers of 64 bits Randomly Filled]]
80
81[*[teletype]
82``
83                          |              |              |
84                          |              |   Maximum    |
85                          | Time ( secs) | Memory Used  |
86    ----------------------+--------------+--------------+
87     std::sort            |    12.381    |     783 MB   |
88     pdqsort              |     9.760    |     783 MB   |
89                          |              |              |
90     std::stable_sort     |    13.311    |    1174 MB   |
91     spinsort             |    11.541    |    1174 MB   |
92     flat_stable_sort     |    13.664    |     787 MB   |
93     spreadsort           |     8.507    |     783 MB   |
94                          |              |              |
95
96``
97]
98
99[h4[_10 000 000  Strings Randomly Filled]]
100
101[*[teletype]
102``
103                          |              |              |
104                          |              |   Maximum    |
105                          | Time ( secs) | Memory Used  |
106    ----------------------+--------------+--------------+
107     std::sort            |    9.658     |     885 MB   |
108     pdqsort              |   15.247     |    1605 MB   |
109                          |              |              |
110     std::stable_sort     |   19.753     |    1041 MB   |
111     spinsort             |   17.596     |    1041 MB   |
112     flat_stable_sort     |   19.159     |     887 MB   |
113     spreadsort           |    5.221     |     885 MB   |
114                          |              |              |
115
116``
117]
118
119[h4[_Objects Randomly Filled]]
120[:
121The objects are arrays of 64 bits numbers
122
123They are compared in two ways :
124[:
125     (H) Heavy : The comparison is the sum of all the numbers of the array.
126
127     (L) Light : The comparison is using only the first element of the array,
128                 as a key
129]
130]
131
132[*[teletype]
133``
134                     |           |           |           |           |           |           |             |
135                     | 100000000 |  50000000 |  25000000 |  12500000 |   6250000 |   1562500 |             |
136                     | objects of| objects of| objects of| objects of| objects of| objects of|   Maximum   |
137                     |  8 bytes  | 16 bytes  | 32 bytes  | 64 bytes  | 128 bytes | 512 bytes |   Memory    |
138                     |           |           |           |           |           |           |   Used      |
139                     |  H     L  |  H     L  |  H     L  |  H     L  |  H     L  |  H     L  |             |
140    -----------------+-----------+-----------+-----------+-----------+-----------+-----------+-------------+
141    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   |
142    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   |
143                     |           |           |           |           |           |           |             |
144    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   |
145    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   |
146    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   |
147    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   |
148                     |           |           |           |           |           |           |             |
149
150
151``
152]
153]
154[endsect]
155[endsect]
156
157
158