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

Fix performance-noexcept-swap clang-tidy warning #6931

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

SiarheiFedartsou
Copy link
Member

@SiarheiFedartsou SiarheiFedartsou commented Jun 6, 2024

#6928

Benchmark Results

Benchmark Base PR
alias aliased u32: 1180.77
plain u32: 1186.22
aliased double: 1264.15
plain double: 1244.71
aliased u32: 1100.22
plain u32: 1100.48
aliased double: 958.534
plain double: 952.62
e2e_match_ch requests: 362
failures: 0
req/s: 6.034req/s
avg: 5.195ms
50%: 3ms
75%: 4ms
95%: 16ms
98%: 28ms
99%: 54ms
min: 1.256ms
max: 79.409ms
requests: 367
failures: 0
req/s: 6.118req/s
avg: 5.176ms
50%: 3ms
75%: 4ms
95%: 16ms
98%: 29ms
99%: 55ms
min: 1.353ms
max: 73.315ms
e2e_match_mld requests: 346
failures: 0
req/s: 5.769req/s
avg: 5.235ms
50%: 3ms
75%: 4ms
95%: 13ms
98%: 41ms
99%: 54ms
min: 1.263ms
max: 78.825ms
requests: 361
failures: 0
req/s: 6.024req/s
avg: 5.188ms
50%: 3ms
75%: 4ms
95%: 15ms
98%: 26ms
99%: 54ms
min: 1.411ms
max: 99.287ms
e2e_nearest_ch requests: 452
failures: 0
req/s: 7.534req/s
avg: 1.604ms
50%: 2ms
75%: 2ms
95%: 2ms
98%: 2ms
99%: 2ms
min: 1.070ms
max: 5.632ms
requests: 443
failures: 0
req/s: 7.385req/s
avg: 1.609ms
50%: 2ms
75%: 2ms
95%: 2ms
98%: 2ms
99%: 2ms
min: 1.044ms
max: 2.439ms
e2e_nearest_mld requests: 410
failures: 0
req/s: 6.836req/s
avg: 1.891ms
50%: 2ms
75%: 2ms
95%: 2ms
98%: 2ms
99%: 3ms
min: 1.000ms
max: 53.821ms
requests: 431
failures: 0
req/s: 7.192req/s
avg: 1.650ms
50%: 2ms
75%: 2ms
95%: 2ms
98%: 2ms
99%: 3ms
min: 1.024ms
max: 2.783ms
e2e_route_ch requests: 423
failures: 0
req/s: 7.050req/s
avg: 4.170ms
50%: 4ms
75%: 5ms
95%: 6ms
98%: 7ms
99%: 9ms
min: 1.401ms
max: 10.576ms
requests: 399
failures: 0
req/s: 6.651req/s
avg: 4.549ms
50%: 4ms
75%: 5ms
95%: 6ms
98%: 7ms
99%: 11ms
min: 1.654ms
max: 122.872ms
e2e_route_mld requests: 373
failures: 0
req/s: 6.219req/s
avg: 5.008ms
50%: 5ms
75%: 5ms
95%: 7ms
98%: 10ms
99%: 12ms
min: 1.619ms
max: 96.637ms
requests: 394
failures: 0
req/s: 6.574req/s
avg: 4.677ms
50%: 4ms
75%: 5ms
95%: 6ms
98%: 8ms
99%: 10ms
min: 1.483ms
max: 96.349ms
e2e_table_ch requests: 387
failures: 0
req/s: 6.450req/s
avg: 45.209ms
50%: 27ms
75%: 75ms
95%: 130ms
98%: 140ms
99%: 140ms
min: 2.528ms
max: 164.615ms
requests: 367
failures: 0
req/s: 6.118req/s
avg: 49.607ms
50%: 32ms
75%: 83ms
95%: 130ms
98%: 140ms
99%: 140ms
min: 2.580ms
max: 161.204ms
e2e_table_mld requests: 390
failures: 0
req/s: 6.503req/s
avg: 75.482ms
50%: 77ms
75%: 110ms
95%: 140ms
98%: 150ms
99%: 150ms
min: 4.564ms
max: 161.799ms
requests: 381
failures: 0
req/s: 6.357req/s
avg: 54.277ms
50%: 35ms
75%: 87ms
95%: 140ms
98%: 160ms
99%: 180ms
min: 3.029ms
max: 217.415ms
e2e_trip_ch requests: 335
failures: 0
req/s: 5.584req/s
avg: 16.960ms
50%: 15ms
75%: 23ms
95%: 32ms
98%: 33ms
99%: 35ms
min: 1.565ms
max: 41.705ms
requests: 353
failures: 0
req/s: 5.885req/s
avg: 17.275ms
50%: 16ms
75%: 22ms
95%: 32ms
98%: 34ms
99%: 35ms
min: 2.633ms
max: 35.554ms
e2e_trip_mld requests: 377
failures: 0
req/s: 6.286req/s
avg: 21.645ms
50%: 21ms
75%: 27ms
95%: 37ms
98%: 38ms
99%: 43ms
min: 3.859ms
max: 52.583ms
requests: 347
failures: 0
req/s: 5.790req/s
avg: 19.431ms
50%: 17ms
75%: 24ms
95%: 35ms
98%: 40ms
99%: 52ms
min: 2.718ms
max: 262.450ms
json-render String: 6.83874ms
Stringstream: 9.42975ms
Vector: 6.99938ms
String: 6.61233ms
Stringstream: 9.41045ms
Vector: 6.927ms
match_ch Default radius:
4.39971ms/req at 82 coordinate
0.053655ms/coordinate
Radius 5m:
4.38432ms/req at 82 coordinate
0.0534673ms/coordinate
Radius 10m:
14.9984ms/req at 82 coordinate
0.182907ms/coordinate
Radius 15m:
36.6858ms/req at 82 coordinate
0.447387ms/coordinate
Radius 30m:
312.541ms/req at 82 coordinate
3.81148ms/coordinate
Default radius:
4.40002ms/req at 82 coordinate
0.0536588ms/coordinate
Radius 5m:
4.3726ms/req at 82 coordinate
0.0533244ms/coordinate
Radius 10m:
14.9772ms/req at 82 coordinate
0.182649ms/coordinate
Radius 15m:
36.6045ms/req at 82 coordinate
0.446397ms/coordinate
Radius 30m:
312.043ms/req at 82 coordinate
3.80541ms/coordinate
match_mld Default radius:
2.79289ms/req at 82 coordinate
0.0340597ms/coordinate
Radius 5m:
2.76467ms/req at 82 coordinate
0.0337155ms/coordinate
Radius 10m:
10.1392ms/req at 82 coordinate
0.123649ms/coordinate
Radius 15m:
25.7933ms/req at 82 coordinate
0.314553ms/coordinate
Radius 30m:
302.272ms/req at 82 coordinate
3.68624ms/coordinate
Default radius:
2.89472ms/req at 82 coordinate
0.0353015ms/coordinate
Radius 5m:
2.88337ms/req at 82 coordinate
0.0351631ms/coordinate
Radius 10m:
10.8536ms/req at 82 coordinate
0.132362ms/coordinate
Radius 15m:
28.039ms/req at 82 coordinate
0.341939ms/coordinate
Radius 30m:
329.688ms/req at 82 coordinate
4.02059ms/coordinate
osrm_contract Time: 95.04s Peak RAM: 185.49MB Time: 94.04s Peak RAM: 185.68MB
osrm_customize Time: 1.32s Peak RAM: 115.02MB Time: 1.34s Peak RAM: 115.02MB
osrm_extract Time: 12.45s Peak RAM: 418.14MB Time: 12.42s Peak RAM: 410.60MB
osrm_partition Time: 2.29s Peak RAM: 148.46MB Time: 2.25s Peak RAM: 150.45MB
packedvector random write:
std::vector 11841.7 ms
util::packed_vector 77584.7 ms
slowdown: 6.55183
random read:
std::vector 11502 ms
util::packed_vector 32121.5 ms
slowdown: 2.79269
random write:
std::vector 9834.68 ms
util::packed_vector 82055.2 ms
slowdown: 8.34345
random read:
std::vector 8536.84 ms
util::packed_vector 33709.8 ms
slowdown: 3.94874
route_ch 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
514.283ms
0.514283ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
353.754ms
0.353754ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
628.087ms
0.628087ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
151.559ms
0.151559ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
97.3603ms
0.0973603ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
132.979ms
0.132979ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
150.479ms
0.150479ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
96.9612ms
0.0969612ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
132.259ms
0.132259ms/req
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
511.879ms
0.511879ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
352.403ms
0.352403ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
630.176ms
0.630176ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
151.984ms
0.151984ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
96.809ms
0.096809ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
131.784ms
0.131784ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
148.425ms
0.148425ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
96.6305ms
0.0966305ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
130.961ms
0.130961ms/req
route_mld 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
638.348ms
0.638348ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
435.959ms
0.435959ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
809.74ms
0.80974ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
264.405ms
0.264405ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
161.915ms
0.161915ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
287.528ms
0.287528ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
264.671ms
0.264671ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
159.96ms
0.15996ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
283.35ms
0.28335ms/req
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
650.198ms
0.650198ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
442.618ms
0.442618ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
827.181ms
0.827181ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
284.729ms
0.284729ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
162.978ms
0.162978ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
303.87ms
0.30387ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
283.513ms
0.283513ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
162.839ms
0.162839ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
304.112ms
0.304112ms/req
rtree 1 result:
208.2ms -> 0.02082 ms/query
10 results:
242.303ms -> 0.0242303 ms/query
1 result:
207.261ms -> 0.0207261 ms/query
10 results:
242.239ms -> 0.0242239 ms/query

@SiarheiFedartsou SiarheiFedartsou marked this pull request as ready for review June 7, 2024 05:42
@SiarheiFedartsou SiarheiFedartsou merged commit c57b0d2 into master Jun 7, 2024
19 of 21 checks passed
@SiarheiFedartsou SiarheiFedartsou deleted the sf-performance-noexcept-swap branch June 7, 2024 14:18
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