-
Notifications
You must be signed in to change notification settings - Fork 19
/
Cargo.toml
284 lines (224 loc) · 8.18 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
[package]
name = "sort_research_rs"
version = "0.1.0"
edition = "2021"
authors = ["Lukas Bergdoll <[email protected]>"]
[lib]
# They are just noisy and this is not meant as a documented library, but as a testbed.
doctest = false
# Arguably everything you want to test should be your oberservable interface.
# Plus it's faster to run everything as integration test.
# See https://matklad.github.io/2021/02/27/delete-cargo-integration-tests.html
test = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
once_cell = "1.15"
paste = "1.0"
zipf = "7.0.0"
fxhash = { version = "0.2", optional = true }
radsort = { version = "0.1", optional = true }
dmsort = { version = "1.0", optional = true }
glidesort = { version = "0.1.2", features = ["unstable"], optional = true }
crumsort = { version = "0.1", optional = true }
tiny_sort = { version = "1.0", optional = true }
introsort = { version = "0.6", default-features = false, optional = true }
afsort = { version = "0.3", default-features = false, optional = true }
sort_test_tools = { path = "sort_test_tools", default-features = false }
ipnsort = { path = "ipnsort", default-features = false }
# driftsort = { path = "../driftsort", optional = true }
[dev-dependencies]
rand = "0.8"
criterion = { version = "0.3", features = ["html_reports"] }
core_affinity = { version = "0.7" }
regex = { version = "^1" }
# Needed because of buffy dependencies.
proc-macro2 = { version = "^1.0.64" }
[build-dependencies]
cc = { version = "1.0", features = ["parallel"] }
# Thin LTO because the bench harness and the library are by default separate "crates" and will not
# benefit from LTO. This is problematic for non-trivial FFI types where the comparison function is
# defined in a separate crate and not visible to the optimizer. C++ in contrast pulls in all this
# information via the headers and doesn't need this.
[profile.release]
lto = "thin"
# opt-level = 0
# debug = true
[profile.bench]
lto = "thin"
[[bench]]
name = "bench"
harness = false
[features]
default = [
"large_test_sizes",
# "cold_benchmarks",
# "evolution",
# "small_sort",
# "partition",
# "partition_point",
# "selection",
# "bench_type_rust_string",
# "bench_type_val_with_mutex",
# "bench_type_u8",
# "bench_type_u16",
# "bench_type_u32",
# "bench_type_u128",
# "bench_type_f32",
# "bench_type_f64",
# "bench_type_f32_total",
# "bench_type_f64_total",
# "cpp_std_sys",
# "cpp_std_libcxx",
# "cpp_std_gcc4_3",
# "cpp_pdqsort",
# "cpp_powersort",
# "cpp_simdsort",
# "cpp_vqsort",
# "cpp_intel_avx512",
# "cpp_ips4o",
# "cpp_blockquicksort",
# "cpp_gerbens_qsort",
# "cpp_nanosort",
# "cpp_wikisort",
# "c_std_sys",
# "c_crumsort",
# "c_fluxsort",
# "singeli_singelisort",
# "golang_std",
# "rust_std_vendored",
# "rust_wpwoodjr",
# "rust_radsort",
# "rust_dmsort",
# "rust_glidesort",
# "rust_driftsort",
# "rust_crumsort_rs",
# "rust_tinysort",
# "rust_introsort",
# "rust_grailsort",
# "rust_afsort",
]
# Enable support for C++ std::sort and std::sort_stable.
cpp_std_sys = []
# Enable support for libcxx.
# You must provide a prebuild static libcxx see: https://libcxx.llvm.org/BuildingLibcxx.html
# Set the enviroment variable LIBCXX_CUSTOM_BUILD_DIR=<...>
# This creates a new cpp_std_libcxx.
cpp_std_libcxx = []
# Enable support for C++ std::sort and std::sort_stable, using gcc 4.3 (2008).
cpp_std_gcc4_3 = []
# Enable support for cpp_pdqsort.
# Uses system C++ standard lib.
cpp_pdqsort = []
# Enable powersort from the Multiway Powersort (2022) paper.
# Uses system C++ standard lib.
cpp_powersort = []
# Enable avx2 sort from simd-sort https://github.com/WojciechMula/simd-sort.
# Uses system C++ standard lib.
cpp_simdsort = []
# Enable highway sort from https://github.com/google/highway/tree/master/.
# Uses clang and libcxx.
cpp_vqsort = []
# Enable avx512 sort from https://github.com/intel/x86-simd-sort.
# Uses clang and libcxx.
cpp_intel_avx512 = []
# Enable ips4o from Engineering In-place (Shared-memory) Sorting Algorithms (2020) paper.
# Uses system C++ standard lib.
cpp_ips4o = []
# Enable BlockQuicksort blocked_double_pivot_check_mosqrt.h from the "BlockQuicksort: Avoiding
# Branch Mispredictions in Quicksort" (2016) paper.
# Uses system C++ standard lib.
cpp_blockquicksort = []
# Enable Gerben Stavenga's QuickSort https://github.com/gerben-s/quicksort-blog-post
# Uses system C++ standard lib.
cpp_gerbens_qsort = []
# Enable Arseny Kapoulkine's nanosort https://github.com/zeux/nanosort
# Uses system C++ standard lib.
cpp_nanosort = []
# Enable Mike McFadden's WikiSort https://github.com/BonzaiThePenguin/WikiSort
# Uses system C++ standard lib.
cpp_wikisort = []
# Enable support for C qsort.
# Uses system C standard lib.
c_std_sys = []
# Enable crumsort by Igor van den Hoven.
# Uses system C++ standard lib.
c_crumsort = []
# Enable fluxsort by Igor van den Hoven.
# Uses system C++ standard lib.
c_fluxsort = []
# Enable SingeliSort by Marshall Lochbaum.
# Uses system C++ standard lib.
singeli_singelisort = []
# Enable golang slices.Sort and slices.SortStable.
golang_std = []
# Enable vendored versions of the the Rust standard library sort implementations.
# Vendored mid 2022.
rust_std_vendored = []
# Enable rust_wpwoodjr sort.
# No additional requirements, but disabled by default to keep things lean.
rust_wpwoodjr = []
# Enable radsort. Radix sort used by bevy.
# No additional requirements, but disabled by default to keep things lean.
rust_radsort = ["radsort"]
# Enable drop-merge sort developed by Emil Ernerfeldt (emilk)
# No additional requirements, but disabled by default to keep things lean.
rust_dmsort = ["dmsort"]
# Enable glidesort by Orson Peters.
rust_glidesort = ["glidesort"]
# Enable driftsort by Orson Peters and Lukas Bergdoll.
# rust_driftsort = ["driftsort"]
# Enable Rust port of crumsort. Parallelized by default and not a carbon copy port. There are
# substantial differences to the original crumsort.
rust_crumsort_rs = ["crumsort"]
# Enable binary-size optimized stable and unstable tiny-sort by Lukas Bergdoll.
rust_tinysort = ["tiny_sort"]
# Enable introsort implemented in Rust by Viktor Dahl here https://github.com/veddan/rust-introsort
rust_introsort = ["introsort"]
# Enable american flag sort implemented in Rust by Anton Hägerstrand here
# https://github.com/antonha/afsort
rust_afsort = ["afsort"]
# Enable grailsort implemented in Rust
# https://github.com/HolyGrailSortProject/Rewritten-Grailsort/blob/master/Rust/src/grailsort.rs
# Version: 6cb3174
# Beware, this impl is quite buggy and doesn't even pass basic sort tests.
rust_grailsort = []
# Enable the sort evolution code.
# Demonstrates various stages and optimizations of stable and unstable sorts.
evolution = ["fxhash"]
# Enable explicit small-sort benchmarks.
small_sort = []
# Enable partition benchmarks.
partition = []
# Enable partition_point benchmarks.
partition_point = []
# Enable selection benchmarks.
selection = []
# --- Other ---
# Add the inline(never) attribute to implementation functions of (un)stable::rust_ipn.
# This allows better tracing with tools like uftrace.
# However this skews the results, the measured effect will vary.
no_inline_sub_functions = []
# Cold benchmarks, enable cold benchmarks that clobber the btb and other CPU caches.
cold_benchmarks = []
# Enable the Rust String "rust_string" type for benchmarks.
# The string benchmarks are performed with FFIString, which should be very close to rust_string.
bench_type_rust_string = []
# Enable the "val_with_mutex" type for benchmarks
bench_type_val_with_mutex = []
# Enable the "u8" type for benchmarks
bench_type_u8 = []
# Enable the "u16" type for benchmarks
bench_type_u16 = []
# Enable the "u32" type for benchmarks
bench_type_u32 = []
# Enable the "u128" type for benchmarks
bench_type_u128 = []
# Enable the "f32" type for benchmarks
bench_type_f32 = []
# Enable the "f64" type for benchmarks
bench_type_f64 = []
# Enable the "f32_total" type for benchmarks
bench_type_f32_total = []
# Enable the "f64_total" type for benchmarks
bench_type_f64_total = []
large_test_sizes = ["sort_test_tools/large_test_sizes"]