FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MPHF-Experiments/src/tablePhobic.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
/
tablePhobic.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
78 lines (64 loc) · 3.25 KB
Breadcrumbs
MPHF-Experiments
/
src
/
tablePhobic.cpp
Copy path
File metadata and controls
78 lines (64 loc) · 3.25 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
#
include
<
bucketplacement/ChdContender.h
>
#
include
<
tlx/cmdline_parser.hpp
>
#
include
"
bucketplacement/PhobicContender.h
"
#
include
"
bucketplacement/PartitionedPTHashContender.h
"
#
include
"
fingerprinting/RustFmphContender.h
"
#
include
"
bucketplacement/PTHashContender.h
"
#
include
"
recsplit/SIMDRecSplitContender.h
"
#
include
"
retrievalbased/SicHashContender.h
"
#
include
"
shockhash/BipartiteShockHashContender.h
"
#
ifdef
HAS_VULKAN
#
include
"
bucketplacement/GpuPhobicContender.h
"
#
endif
/*
*
* Comparison table used in "PHOBIC: Perfect Hashing with Optimized Bucket Sizes and Interleaved Coding".
* https://arxiv.org/pdf/2404.18497
*/
int
main
(
int
argc,
char
** argv) {
size_t
N =
5e6
;
tlx::CmdlineParser cmd;
cmd.
add_bytes
(
'
n
'
,
"
numKeys
"
, N,
"
Number of objects
"
);
cmd.
add_bytes
(
'
q
'
,
"
numQueries
"
, Contender::numQueries,
"
Number of queries to perform
"
);
cmd.
add_bytes
(
'
t
'
,
"
numThreads
"
, Contender::numThreads,
"
Number of threads to use for construction
"
);
cmd.
add_flag
(
'
T
'
,
"
skipTests
"
, Contender::skipTests,
"
Skip testing PHF for validity
"
);
if
(!cmd.
process
(argc, argv)) {
return
1
;
}
/*
// CPU vs GPU
for (size_t n = 5120; n <= 1e8; n *= 4) {
{PhobicContender<pthash::multi_interleaved<pthash::rice>, pthash::table_bucketer<pthash::opt_bucketer>>(n, 1.0, 8.0).run();}
{GpuPtHashContender(n, 8.0, 2500, 1.0).run();} // multi-R
}
*/
{SicHashContender<
true
,
64
>(N,
0.97
,
sichash::SicHashConfig
().
percentages
(
0.45
,
0.31
)).
run
();}
{SicHashContender<
true
,
64
>(N,
0.9
,
sichash::SicHashConfig
().
percentages
(
0.21
,
0.78
)).
run
();}
{SIMDRecSplitContender<
5
>(N,
5
).
run
();}
{SIMDRecSplitContender<
8
>(N,
100
).
run
();}
{SIMDRecSplitContender<
14
>(N,
2000
).
run
();}
{BipartiteShockHashContender<
42
>(N,
2000
).
run
();}
{BipartiteShockHashContender<
64
>(N,
2000
).
run
();}
{
RustFmphContender
(N,
1.0
).
run
();}
{
RustFmphContender
(N,
2.0
).
run
();}
{
ChdContender
(N,
1.0
,
1.0
,
3
,
true
).
run
();}
{
ChdContender
(N,
1.0
,
1.0
,
5
,
true
).
run
();}
{PTHashContender<
true
, pthash::compact_compact>(N,
0.99
,
4.0
).
run
();}
{PTHashContender<
true
, pthash::elias_fano >(N,
0.99
,
5.0
).
run
();}
{PTHashContender<
true
, pthash::elias_fano>(N,
0.99
,
10.5
).
run
();}
{PartitionedPTHashContender<
true
, pthash::compact_compact>(N,
0.99
,
4.0
).
run
();}
{PartitionedPTHashContender<
true
, pthash::elias_fano>(N,
0.99
,
5.0
).
run
();}
{PhobicContender<pthash::dense_interleaved<pthash::compact>, pthash::opt_bucketer>(N,
1.0
,
3.9
).
run
();}
{PhobicContender<pthash::dense_interleaved<pthash::rice>, pthash::opt_bucketer>(N,
1.0
,
4.5
).
run
();}
{PhobicContender<pthash::dense_interleaved<pthash::rice>, pthash::opt_bucketer>(N,
1.0
,
6.5
).
run
();}
{PhobicContender<pthash::dense_interleaved<pthash::rice>, pthash::opt_bucketer>(N,
1.0
,
7.0
).
run
();}
{PhobicContender<pthash::dense_interleaved<pthash::rice>, pthash::opt_bucketer>(N,
1.0
,
9.0
).
run
();}
#
ifdef
HAS_VULKAN
{
GpuPhobicContender
(N,
9
,
2500
,
1.0
).
run
();}
//
Multi-R
{
GpuPhobicContender
(N,
9
,
2500
,
0.0
).
run
();}
//
Multi-C
{
GpuPhobicContender
(N,
13
,
2500
,
1.0
).
run
();}
{
GpuPhobicContender
(N,
14
,
2500
,
1.0
).
run
();}
#
else
std::cout<<
"
Notice: Vulkan competitor not compiled into this binary
"
<<std::endl;
#
endif
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL