Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make constants in PackedVector constexpr #6917

Merged
merged 3 commits into from
May 30, 2024

Conversation

SiarheiFedartsou
Copy link
Member

@SiarheiFedartsou SiarheiFedartsou commented May 30, 2024

Fixes old TODO.

Benchmark Results

Benchmark Base PR
alias aliased u32: 1091.83
plain u32: 1103.7
aliased double: 946.009
plain double: 947.178
aliased u32: 1094.02
plain u32: 1086.57
aliased double: 955.325
plain double: 953.975
json-render String: 6.60321ms
Stringstream: 9.26222ms
Vector: 6.84999ms
String: 6.56698ms
Stringstream: 9.28439ms
Vector: 6.85995ms
match_ch Default radius:
4.47777ms/req at 82 coordinate
0.054607ms/coordinate
Radius 5m:
4.47312ms/req at 82 coordinate
0.0545503ms/coordinate
Radius 10m:
15.2705ms/req at 82 coordinate
0.186226ms/coordinate
Radius 15m:
37.564ms/req at 82 coordinate
0.458098ms/coordinate
Radius 30m:
318.241ms/req at 82 coordinate
3.88099ms/coordinate
Default radius:
4.43106ms/req at 82 coordinate
0.0540373ms/coordinate
Radius 5m:
4.42271ms/req at 82 coordinate
0.0539355ms/coordinate
Radius 10m:
15.0701ms/req at 82 coordinate
0.183782ms/coordinate
Radius 15m:
36.8092ms/req at 82 coordinate
0.448893ms/coordinate
Radius 30m:
314.393ms/req at 82 coordinate
3.83406ms/coordinate
match_mld Default radius:
2.84118ms/req at 82 coordinate
0.0346486ms/coordinate
Radius 5m:
2.81614ms/req at 82 coordinate
0.0343431ms/coordinate
Radius 10m:
10.4999ms/req at 82 coordinate
0.128047ms/coordinate
Radius 15m:
26.878ms/req at 82 coordinate
0.327781ms/coordinate
Radius 30m:
316.391ms/req at 82 coordinate
3.85843ms/coordinate
Default radius:
2.80181ms/req at 82 coordinate
0.0341684ms/coordinate
Radius 5m:
2.79596ms/req at 82 coordinate
0.0340971ms/coordinate
Radius 10m:
10.2739ms/req at 82 coordinate
0.125291ms/coordinate
Radius 15m:
26.3782ms/req at 82 coordinate
0.321685ms/coordinate
Radius 30m:
308.975ms/req at 82 coordinate
3.76798ms/coordinate
packedvector random write:
std::vector 10159.2 ms
util::packed_vector 78449.2 ms
slowdown: 7.72198
random read:
std::vector 10388 ms
util::packed_vector 33958.5 ms
slowdown: 3.26902
random write:
std::vector 10954.1 ms
util::packed_vector 82178.4 ms
slowdown: 7.50209
random read:
std::vector 11107.2 ms
util::packed_vector 33510.9 ms
slowdown: 3.01703
route_ch 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
516.621ms
0.516621ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
354.636ms
0.354636ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
640.531ms
0.640531ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
152.159ms
0.152159ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
97.7101ms
0.0977101ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
132.8ms
0.1328ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
152.486ms
0.152486ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
98.0277ms
0.0980277ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
133.134ms
0.133134ms/req
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
507.618ms
0.507618ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
350.806ms
0.350806ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
627.321ms
0.627321ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
151.31ms
0.15131ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
97.3628ms
0.0973628ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
132.306ms
0.132306ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
150.321ms
0.150321ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
97.2103ms
0.0972103ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
135.12ms
0.13512ms/req
route_mld 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
642.707ms
0.642707ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
442.724ms
0.442724ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
819.727ms
0.819727ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
285.043ms
0.285043ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
165.497ms
0.165497ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
304.867ms
0.304867ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
274.945ms
0.274945ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
162.144ms
0.162144ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
297.842ms
0.297842ms/req
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
647.214ms
0.647214ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
451.564ms
0.451564ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
824.172ms
0.824172ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
282.454ms
0.282454ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
170.298ms
0.170298ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
299.853ms
0.299853ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
275.947ms
0.275947ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
165.832ms
0.165832ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
297.993ms
0.297993ms/req
rtree 1 result:
207.122ms -> 0.0207122 ms/query
10 results:
242.587ms -> 0.0242587 ms/query
1 result:
206.96ms -> 0.020696 ms/query
10 results:
242.299ms -> 0.0242299 ms/query

@SiarheiFedartsou SiarheiFedartsou marked this pull request as ready for review May 30, 2024 10:53
@SiarheiFedartsou SiarheiFedartsou merged commit 1ff096a into master May 30, 2024
21 checks passed
@SiarheiFedartsou SiarheiFedartsou deleted the sf-packed-vector-constexpr branch May 30, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants