FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MPHF-Experiments/src/scalingSurvey.cpp at main · ByteHamster/MPHF-Experiments · GitHub
ByteHamster
/
MPHF-Experiments
Public
Notifications
You must be signed in to change notification settings
Fork
5
Star
11
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
MPHF-Experiments
/
src
/
scalingSurvey.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
81 lines (75 loc) · 3.63 KB
Breadcrumbs
MPHF-Experiments
/
src
/
scalingSurvey.cpp
Copy path
File metadata and controls
81 lines (75 loc) · 3.63 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#
include
<
bucketplacement/FchContender.h
>
#
include
<
bucketplacement/RustPtrHashContender.h
>
#
include
<
recsplit/ConsensusContender.h
>
#
include
<
shockhash/MorphisHashContender.h
>
#
include
<
shockhash/MorphisHashFlatContender.h
>
#
include
<
shockhash/ShockHashSimdContender.h
>
#
include
<
tlx/cmdline_parser.hpp
>
#
include
"
bucketplacement/ChdContender.h
"
#
include
"
bucketplacement/PhobicContender.h
"
#
include
"
bucketplacement/PartitionedPTHashContender.h
"
#
include
"
fingerprinting/FiPSContender.h
"
#
include
"
fingerprinting/RustFmphContender.h
"
#
include
"
retrievalbased/BdzContender.h
"
#
include
"
bucketplacement/PTHashContender.h
"
#
include
"
fingerprinting/BBHashContender.h
"
#
include
"
fingerprinting/RustFmphGoContender.h
"
#
include
"
recsplit/RecSplitContender.h
"
#
include
"
recsplit/SIMDRecSplitContender.h
"
#
include
"
retrievalbased/SicHashContender.h
"
#
include
"
shockhash/BipartiteShockHashContender.h
"
#
include
"
shockhash/BipartiteShockHashFlatContender.h
"
#
include
"
shockhash/ShockHashContender.h
"
#
include
"
bucketplacement/RustPhastContender.h
"
#
include
"
bucketplacement/RustPhastPlusWrappedContender.h
"
/*
*
* Comparison table used in "Modern Minimal Perfect Hashing".
* https://arxiv.org/abs/2506.06536
*/
int
main
(
int
argc,
char
** argv) {
size_t
N =
5e6
;
size_t
iterations =
1
;
size_t
numQueries =
15e7
;
tlx::CmdlineParser cmd;
cmd.
add_bytes
(
'
n
'
,
"
numKeys
"
, N,
"
Number of objects
"
);
cmd.
add_bytes
(
'
i
'
,
"
iterations
"
, iterations,
"
Number of iterations to execute
"
);
cmd.
add_bytes
(
'
q
'
,
"
numQueries
"
, numQueries,
"
Number of queries to perform
"
);
cmd.
add_bytes
(
'
Q
'
,
"
numQueryThreads
"
, Contender::numQueryThreads,
"
Number of threads to run queries with
"
);
cmd.
add_bytes
(
'
t
'
,
"
numThreads
"
, Contender::numThreads,
"
Number of threads to run benchmarks with
"
);
cmd.
add_flag
(
'
T
'
,
"
skipTests
"
, Contender::skipTests,
"
Skip testing PHF for validity
"
);
if
(!cmd.
process
(argc, argv)) {
return
1
;
}
for
(
size_t
i =
0
; i < iterations; i++) {
//
Queries of PTHash and SicHash have quite a bit of noise in the measurements.
//
Run more queries to work around that.
Contender::numQueries = numQueries;
{PTHashContender<
true
, pthash::elias_fano>(N,
0.95
,
6.0
).
run
();}
{PartitionedPTHashContender<
true
, pthash::elias_fano>(N,
0.95
,
6.0
).
run
();}
{PhobicContender<pthash::dense_interleaved<pthash::rice>, pthash::opt_bucketer>(N,
1.0
,
6.0
).
run
();}
{
RustPtrHashContender
(N, RustPtrHashContender::
VARIANT_LINEAR_VEC
,
3.0
).
run
();}
{SicHashContender<
true
,
64
>(N,
0.95
,
sichash::SicHashConfig
().
percentages
(
0.37
,
0.44
)).
run
();}
Contender::numQueries = numQueries /
3
;
{SIMDRecSplitContender<
8
>(N,
100
).
run
();}
{
RustFmphContender
(N,
5.0
).
run
();}
{
RustFmphGoContender
(N,
5.0
).
run
();}
{
BBHashContender
(N,
5.0
,
0
).
run
();}
{BipartiteShockHashContender<
64
>(N,
2000
).
run
();}
{MorphisHashContender<
64
,
4
>(N,
2000
).
run
();}
{
RustPhastContender
(N,
7
,
370
,
true
).
run
();}
{
RustPhastPlusWrappedContender
(N,
1
,
11
,
660
,
0
,
true
).
run
();}
//
Competitors that are only single-threaded
if
(Contender::numThreads ==
1
) {
{RecSplitContender<
8
>(N,
100
).
run
();}
{ShockHashSimdContender<
40
>(N,
2000
).
run
();}
{BipartiteShockHashFlatContender<
64
>(N).
run
();}
{
BdzContender
(N,
0.8
,
1.0
/
0.8
,
3
,
true
).
run
();}
{FiPSContender<
256
,
uint32_t
,
false
>(N,
5.0
).
run
();}
{MorphisHashFlatContender<
84
,
3
,
2
>(N).
run
();}
{
FchContender
(N,
7
).
run
();}
{
ChdContender
(N,
1.0
,
1.0
,
4
,
true
).
run
();}
{ConsensusContender<
512
,
0.1
>(N).
run
();}
}
}
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL