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

Get rid of boost::optional leftovers #6977

Merged
merged 10 commits into from
Jul 2, 2024
Merged

Conversation

SiarheiFedartsou
Copy link
Member

@SiarheiFedartsou SiarheiFedartsou commented Jun 30, 2024

:)

Benchmark Results

Benchmark Base PR
alias aliased u32: 1151.01
plain u32: 1155.63
aliased double: 1199.74
plain double: 1200.37
aliased u32: 1096.92
plain u32: 1066
aliased double: 951.559
plain double: 951.917
e2e_match_ch Ops: 45.73 ± 0.06 ops/s. Best: 45.79 ops/s
Total: 2864.80ms ± 3.60ms. Best: 2860.88ms
Min time: 2.19ms ± 0.02ms
Mean time: 21.87ms ± 0.03ms
Median time: 15.68ms ± 0.03ms
95th percentile: 72.01ms ± 0.31ms
99th percentile: 89.15ms ± 1.00ms
Max time: 100.23ms ± 0.33ms
Ops: 45.51 ± 0.17 ops/s. Best: 45.72 ops/s
Total: 2878.22ms ± 10.89ms. Best: 2865.50ms
Min time: 2.14ms ± 0.05ms
Mean time: 21.98ms ± 0.08ms
Median time: 15.86ms ± 0.08ms
95th percentile: 71.90ms ± 0.34ms
99th percentile: 88.86ms ± 0.35ms
Max time: 100.84ms ± 0.29ms
e2e_match_mld Ops: 65.27 ± 0.19 ops/s. Best: 65.48 ops/s
Total: 2006.97ms ± 6.07ms. Best: 2000.48ms
Min time: 1.78ms ± 0.02ms
Mean time: 15.32ms ± 0.05ms
Median time: 8.21ms ± 0.07ms
95th percentile: 50.84ms ± 0.10ms
99th percentile: 58.69ms ± 0.14ms
Max time: 68.31ms ± 0.20ms
Ops: 64.59 ± 0.25 ops/s. Best: 64.87 ops/s
Total: 2028.30ms ± 8.38ms. Best: 2019.49ms
Min time: 1.79ms ± 0.04ms
Mean time: 15.48ms ± 0.06ms
Median time: 8.35ms ± 0.11ms
95th percentile: 51.23ms ± 0.44ms
99th percentile: 59.10ms ± 0.40ms
Max time: 68.44ms ± 0.20ms
e2e_nearest_ch Ops: 804.00 ± 4.82 ops/s. Best: 808.80 ops/s
Total: 1243.76ms ± 7.53ms. Best: 1236.40ms
Min time: 1.06ms ± 0.00ms
Mean time: 1.24ms ± 0.01ms
Median time: 1.16ms ± 0.01ms
95th percentile: 1.64ms ± 0.01ms
99th percentile: 1.69ms ± 0.01ms
Max time: 4.21ms ± 2.29ms
Ops: 795.36 ± 4.69 ops/s. Best: 800.14 ops/s
Total: 1257.38ms ± 8.00ms. Best: 1249.78ms
Min time: 1.07ms ± 0.01ms
Mean time: 1.26ms ± 0.01ms
Median time: 1.17ms ± 0.01ms
95th percentile: 1.66ms ± 0.01ms
99th percentile: 1.71ms ± 0.01ms
Max time: 4.25ms ± 2.34ms
e2e_nearest_mld Ops: 808.23 ± 6.83 ops/s. Best: 816.55 ops/s
Total: 1237.27ms ± 11.10ms. Best: 1224.66ms
Min time: 1.06ms ± 0.01ms
Mean time: 1.24ms ± 0.01ms
Median time: 1.15ms ± 0.01ms
95th percentile: 1.63ms ± 0.01ms
99th percentile: 1.69ms ± 0.02ms
Max time: 4.10ms ± 2.35ms
Ops: 806.81 ± 5.61 ops/s. Best: 814.93 ops/s
Total: 1239.38ms ± 9.12ms. Best: 1227.10ms
Min time: 1.05ms ± 0.01ms
Mean time: 1.24ms ± 0.01ms
Median time: 1.15ms ± 0.01ms
95th percentile: 1.64ms ± 0.01ms
99th percentile: 1.70ms ± 0.01ms
Max time: 4.17ms ± 2.37ms
e2e_route_ch Ops: 353.20 ± 2.18 ops/s. Best: 355.56 ops/s
Total: 2831.91ms ± 19.94ms. Best: 2812.50ms
Min time: 1.27ms ± 0.02ms
Mean time: 2.83ms ± 0.02ms
Median time: 2.84ms ± 0.02ms
95th percentile: 3.76ms ± 0.06ms
99th percentile: 4.22ms ± 0.21ms
Max time: 6.94ms ± 1.71ms
Ops: 344.07 ± 3.87 ops/s. Best: 348.49 ops/s
Total: 2907.76ms ± 33.94ms. Best: 2869.48ms
Min time: 1.29ms ± 0.01ms
Mean time: 2.91ms ± 0.03ms
Median time: 2.92ms ± 0.04ms
95th percentile: 3.84ms ± 0.07ms
99th percentile: 4.25ms ± 0.12ms
Max time: 6.52ms ± 1.80ms
e2e_route_mld Ops: 297.02 ± 0.60 ops/s. Best: 298.08 ops/s
Total: 3366.76ms ± 7.14ms. Best: 3354.83ms
Min time: 1.27ms ± 0.02ms
Mean time: 3.37ms ± 0.01ms
Median time: 3.40ms ± 0.01ms
95th percentile: 4.56ms ± 0.02ms
99th percentile: 5.09ms ± 0.03ms
Max time: 7.19ms ± 1.60ms
Ops: 289.19 ± 1.04 ops/s. Best: 290.80 ops/s
Total: 3458.33ms ± 12.61ms. Best: 3438.80ms
Min time: 1.30ms ± 0.03ms
Mean time: 3.46ms ± 0.01ms
Median time: 3.48ms ± 0.02ms
95th percentile: 4.72ms ± 0.03ms
99th percentile: 5.22ms ± 0.09ms
Max time: 7.46ms ± 1.53ms
e2e_table_ch Ops: 302.00 ± 0.82 ops/s. Best: 302.95 ops/s
Total: 3311.14ms ± 9.05ms. Best: 3300.85ms
Min time: 1.73ms ± 0.00ms
Mean time: 3.31ms ± 0.01ms
Median time: 3.31ms ± 0.01ms
95th percentile: 4.58ms ± 0.02ms
99th percentile: 4.91ms ± 0.04ms
Max time: 7.41ms ± 2.25ms
Ops: 299.02 ± 1.51 ops/s. Best: 301.01 ops/s
Total: 3344.51ms ± 17.40ms. Best: 3322.13ms
Min time: 1.76ms ± 0.02ms
Mean time: 3.34ms ± 0.02ms
Median time: 3.36ms ± 0.02ms
95th percentile: 4.63ms ± 0.03ms
99th percentile: 4.99ms ± 0.04ms
Max time: 7.59ms ± 2.45ms
e2e_table_mld Ops: 112.90 ± 0.18 ops/s. Best: 113.19 ops/s
Total: 8857.55ms ± 14.36ms. Best: 8834.47ms
Min time: 3.59ms ± 0.04ms
Mean time: 8.86ms ± 0.01ms
Median time: 8.81ms ± 0.02ms
95th percentile: 13.51ms ± 0.03ms
99th percentile: 14.40ms ± 0.06ms
Max time: 16.45ms ± 1.44ms
Ops: 111.56 ± 0.26 ops/s. Best: 111.86 ops/s
Total: 8963.85ms ± 21.55ms. Best: 8939.49ms
Min time: 3.64ms ± 0.05ms
Mean time: 8.96ms ± 0.02ms
Median time: 8.94ms ± 0.02ms
95th percentile: 13.71ms ± 0.06ms
99th percentile: 14.58ms ± 0.10ms
Max time: 17.38ms ± 1.42ms
e2e_trip_ch Ops: 98.90 ± 0.88 ops/s. Best: 99.72 ops/s
Total: 10107.73ms ± 89.23ms. Best: 10028.44ms
Min time: 1.51ms ± 0.15ms
Mean time: 10.11ms ± 0.09ms
Median time: 9.59ms ± 0.08ms
95th percentile: 17.92ms ± 0.17ms
99th percentile: 19.33ms ± 0.12ms
Max time: 23.40ms ± 1.94ms
Ops: 96.60 ± 0.90 ops/s. Best: 97.49 ops/s
Total: 10352.95ms ± 97.60ms. Best: 10257.09ms
Min time: 1.57ms ± 0.17ms
Mean time: 10.35ms ± 0.10ms
Median time: 9.89ms ± 0.09ms
95th percentile: 18.40ms ± 0.14ms
99th percentile: 19.90ms ± 0.16ms
Max time: 22.26ms ± 1.70ms
e2e_trip_mld Ops: 59.97 ± 0.20 ops/s. Best: 60.17 ops/s
Total: 16673.58ms ± 55.75ms. Best: 16618.72ms
Min time: 1.61ms ± 0.18ms
Mean time: 16.68ms ± 0.06ms
Median time: 16.25ms ± 0.05ms
95th percentile: 27.42ms ± 0.05ms
99th percentile: 29.11ms ± 0.14ms
Max time: 31.00ms ± 0.48ms
Ops: 58.62 ± 0.15 ops/s. Best: 58.89 ops/s
Total: 17056.58ms ± 46.21ms. Best: 16981.96ms
Min time: 1.67ms ± 0.26ms
Mean time: 17.06ms ± 0.05ms
Median time: 16.62ms ± 0.04ms
95th percentile: 28.01ms ± 0.09ms
99th percentile: 29.69ms ± 0.10ms
Max time: 36.23ms ± 5.17ms
json-render String: 6.71826ms
Stringstream: 10.5533ms
Vector: 6.7972ms
String: 6.84561ms
Stringstream: 10.748ms
Vector: 6.86847ms
match_ch Default radius:
4.48617ms/req at 82 coordinate
0.0547094ms/coordinate
Radius 10m:
15.628ms/req at 82 coordinate
0.190586ms/coordinate
Default radius:
4.47879ms/req at 82 coordinate
0.0546194ms/coordinate
Radius 10m:
15.5643ms/req at 82 coordinate
0.189809ms/coordinate
match_mld Default radius:
3.39581ms/req at 82 coordinate
0.0414123ms/coordinate
Radius 10m:
10.9834ms/req at 82 coordinate
0.133944ms/coordinate
Default radius:
2.97613ms/req at 82 coordinate
0.0362943ms/coordinate
Radius 10m:
10.6916ms/req at 82 coordinate
0.130386ms/coordinate
osrm_contract Time: 96.47s Peak RAM: 201.25MB Time: 96.37s Peak RAM: 201.75MB
osrm_customize Time: 1.31s Peak RAM: 116.75MB Time: 1.31s Peak RAM: 116.75MB
osrm_extract Time: 11.88s Peak RAM: 404.60MB Time: 11.89s Peak RAM: 407.69MB
osrm_partition Time: 1.98s Peak RAM: 133.39MB Time: 1.98s Peak RAM: 135.14MB
packedvector random write:
std::vector 9916.18 ms
util::packed_vector 74017.2 ms
slowdown: 7.46428
random read:
std::vector 8533.9 ms
util::packed_vector 30825.4 ms
slowdown: 3.61212
random write:
std::vector 9798.61 ms
util::packed_vector 77737.5 ms
slowdown: 7.93353
random read:
std::vector 8448.45 ms
util::packed_vector 30881.8 ms
slowdown: 3.65533
random_match_ch 500 matches, default radius
ops: 219.43 ± 1.00 ops/s. best: 220.87ops/s.
total: 259.77 ± 1.20ms. best: 258.07ms.
avg: 4.56 ± 0.02ms
min: 0.16 ± 0.01ms
max: 25.01 ± 0.13ms
p99: 25.01 ± 0.13ms

500 matches, radius=10
ops: 65.63 ± 0.06 ops/s. best: 65.72ops/s.
total: 975.20 ± 0.93ms. best: 973.77ms.
avg: 15.24 ± 0.01ms
min: 0.16 ± 0.00ms
max: 217.64 ± 0.59ms
p99: 217.64 ± 0.59ms

500 matches, radius=20
ops: 15.56 ± 0.03 ops/s. best: 15.61ops/s.
total: 4177.51 ± 8.84ms. best: 4163.67ms.
avg: 64.27 ± 0.14ms
min: 0.31 ± 0.01ms
max: 1129.05 ± 3.88ms
p99: 1129.05 ± 3.88ms
500 matches, default radius
ops: 215.71 ± 0.83 ops/s. best: 216.65ops/s.
total: 264.25 ± 1.01ms. best: 263.09ms.
avg: 4.64 ± 0.02ms
min: 0.16 ± 0.01ms
max: 25.32 ± 0.10ms
p99: 25.32 ± 0.10ms

500 matches, radius=10
ops: 64.37 ± 0.29 ops/s. best: 64.68ops/s.
total: 994.23 ± 4.52ms. best: 989.42ms.
avg: 15.53 ± 0.07ms
min: 0.16 ± 0.00ms
max: 221.05 ± 1.26ms
p99: 221.05 ± 1.26ms

500 matches, radius=20
ops: 15.31 ± 0.02 ops/s. best: 15.34ops/s.
total: 4245.50 ± 5.21ms. best: 4236.20ms.
avg: 65.32 ± 0.08ms
min: 0.31 ± 0.00ms
max: 1149.43 ± 2.52ms
p99: 1149.43 ± 2.52ms
random_match_mld 500 matches, default radius
ops: 313.98 ± 1.60 ops/s. best: 315.63ops/s.
total: 181.55 ± 0.93ms. best: 180.59ms.
avg: 3.19 ± 0.02ms
min: 0.14 ± 0.00ms
max: 18.80 ± 0.04ms
p99: 18.80 ± 0.04ms

500 matches, radius=10
ops: 110.91 ± 0.27 ops/s. best: 111.29ops/s.
total: 577.03 ± 1.40ms. best: 575.06ms.
avg: 9.02 ± 0.02ms
min: 0.15 ± 0.00ms
max: 109.56 ± 0.38ms
p99: 109.56 ± 0.38ms

500 matches, radius=20
ops: 22.22 ± 0.03 ops/s. best: 22.25ops/s.
total: 2925.44 ± 3.36ms. best: 2921.73ms.
avg: 45.01 ± 0.05ms
min: 0.20 ± 0.00ms
max: 575.42 ± 0.75ms
p99: 575.42 ± 0.75ms
500 matches, default radius
ops: 322.10 ± 1.60 ops/s. best: 323.90ops/s.
total: 176.97 ± 0.89ms. best: 175.98ms.
avg: 3.10 ± 0.02ms
min: 0.14 ± 0.00ms
max: 18.36 ± 0.03ms
p99: 18.36 ± 0.03ms

500 matches, radius=10
ops: 113.94 ± 0.23 ops/s. best: 114.16ops/s.
total: 561.70 ± 1.13ms. best: 560.60ms.
avg: 8.78 ± 0.02ms
min: 0.15 ± 0.00ms
max: 106.09 ± 0.37ms
p99: 106.09 ± 0.37ms

500 matches, radius=20
ops: 22.87 ± 0.04 ops/s. best: 22.95ops/s.
total: 2842.40 ± 5.30ms. best: 2832.65ms.
avg: 43.73 ± 0.08ms
min: 0.20 ± 0.00ms
max: 556.91 ± 1.33ms
p99: 556.91 ± 1.33ms
random_nearest_ch 10000 nearest, number_of_results=1
ops: 22776.97 ± 104.82 ops/s. best: 22879.66ops/s.
total: 439.05 ± 2.03ms. best: 437.07ms.
avg: 0.04 ± 0.00ms
min: 0.01 ± 0.00ms
max: 0.17 ± 0.04ms
p99: 0.11 ± 0.00ms

10000 nearest, number_of_results=5
ops: 17618.63 ± 55.08 ops/s. best: 17697.91ops/s.
total: 567.59 ± 1.86ms. best: 565.04ms.
avg: 0.06 ± 0.00ms
min: 0.02 ± 0.00ms
max: 0.16 ± 0.01ms
p99: 0.12 ± 0.00ms

10000 nearest, number_of_results=10
ops: 14275.65 ± 8.67 ops/s. best: 14287.06ops/s.
total: 700.49 ± 0.43ms. best: 699.93ms.
avg: 0.07 ± 0.00ms
min: 0.03 ± 0.00ms
max: 0.17 ± 0.00ms
p99: 0.14 ± 0.00ms
10000 nearest, number_of_results=1
ops: 22847.80 ± 135.62 ops/s. best: 22987.06ops/s.
total: 437.70 ± 2.62ms. best: 435.03ms.
avg: 0.04 ± 0.00ms
min: 0.01 ± 0.00ms
max: 0.18 ± 0.04ms
p99: 0.11 ± 0.00ms

10000 nearest, number_of_results=5
ops: 17836.78 ± 32.26 ops/s. best: 17888.58ops/s.
total: 560.64 ± 1.03ms. best: 559.02ms.
avg: 0.06 ± 0.00ms
min: 0.02 ± 0.00ms
max: 0.16 ± 0.00ms
p99: 0.12 ± 0.00ms

10000 nearest, number_of_results=10
ops: 14222.64 ± 258.32 ops/s. best: 14413.89ops/s.
total: 703.48 ± 13.18ms. best: 693.78ms.
avg: 0.07 ± 0.00ms
min: 0.03 ± 0.00ms
max: 0.21 ± 0.06ms
p99: 0.14 ± 0.01ms
random_nearest_mld 10000 nearest, number_of_results=1
ops: 22677.22 ± 51.04 ops/s. best: 22787.30ops/s.
total: 440.97 ± 1.00ms. best: 438.84ms.
avg: 0.04 ± 0.00ms
min: 0.01 ± 0.00ms
max: 0.19 ± 0.04ms
p99: 0.11 ± 0.00ms

10000 nearest, number_of_results=5
ops: 17669.17 ± 26.38 ops/s. best: 17695.89ops/s.
total: 565.96 ± 0.85ms. best: 565.10ms.
avg: 0.06 ± 0.00ms
min: 0.02 ± 0.00ms
max: 0.16 ± 0.00ms
p99: 0.12 ± 0.00ms

10000 nearest, number_of_results=10
ops: 14291.41 ± 21.03 ops/s. best: 14317.91ops/s.
total: 699.72 ± 1.07ms. best: 698.43ms.
avg: 0.07 ± 0.00ms
min: 0.03 ± 0.00ms
max: 0.17 ± 0.00ms
p99: 0.14 ± 0.00ms
10000 nearest, number_of_results=1
ops: 22931.94 ± 44.82 ops/s. best: 22989.87ops/s.
total: 436.08 ± 0.85ms. best: 434.97ms.
avg: 0.04 ± 0.00ms
min: 0.01 ± 0.00ms
max: 0.17 ± 0.03ms
p99: 0.11 ± 0.00ms

10000 nearest, number_of_results=5
ops: 17790.33 ± 76.78 ops/s. best: 17866.41ops/s.
total: 562.12 ± 2.43ms. best: 559.71ms.
avg: 0.06 ± 0.00ms
min: 0.02 ± 0.00ms
max: 0.16 ± 0.00ms
p99: 0.12 ± 0.00ms

10000 nearest, number_of_results=10
ops: 14302.36 ± 53.11 ops/s. best: 14367.17ops/s.
total: 699.20 ± 2.60ms. best: 696.03ms.
avg: 0.07 ± 0.00ms
min: 0.03 ± 0.00ms
max: 0.17 ± 0.00ms
p99: 0.14 ± 0.00ms
random_route_ch 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
ops: 502.04 ± 1.89 ops/s. best: 505.27ops/s.
total: 1960.03 ± 7.36ms. best: 1947.46ms.
avg: 1.99 ± 0.01ms
min: 0.33 ± 0.01ms
max: 3.41 ± 0.15ms
p99: 2.90 ± 0.04ms

1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
ops: 590.88 ± 3.57 ops/s. best: 594.26ops/s.
total: 1692.48 ± 10.31ms. best: 1682.76ms.
avg: 1.69 ± 0.01ms
min: 0.05 ± 0.00ms
max: 4.08 ± 0.08ms
p99: 3.67 ± 0.06ms

1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
ops: 991.60 ± 10.16 ops/s. best: 1004.61ops/s.
total: 992.47 ± 10.23ms. best: 979.48ms.
avg: 1.01 ± 0.01ms
min: 0.28 ± 0.00ms
max: 1.65 ± 0.03ms
p99: 1.41 ± 0.03ms

1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
ops: 1049.69 ± 21.22 ops/s. best: 1098.93ops/s.
total: 953.18 ± 18.78ms. best: 909.98ms.
avg: 0.95 ± 0.02ms
min: 0.04 ± 0.00ms
max: 2.47 ± 0.06ms
p99: 2.19 ± 0.04ms
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
ops: 506.10 ± 3.27 ops/s. best: 509.98ops/s.
total: 1944.39 ± 12.63ms. best: 1929.49ms.
avg: 1.98 ± 0.01ms
min: 0.33 ± 0.00ms
max: 3.62 ± 0.49ms
p99: 2.91 ± 0.11ms

1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
ops: 576.61 ± 6.90 ops/s. best: 591.32ops/s.
total: 1734.58 ± 19.30ms. best: 1691.12ms.
avg: 1.73 ± 0.02ms
min: 0.05 ± 0.00ms
max: 4.28 ± 0.09ms
p99: 3.77 ± 0.06ms

1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
ops: 987.61 ± 8.89 ops/s. best: 1004.73ops/s.
total: 996.45 ± 8.92ms. best: 979.37ms.
avg: 1.01 ± 0.01ms
min: 0.28 ± 0.00ms
max: 1.72 ± 0.10ms
p99: 1.44 ± 0.04ms

1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
ops: 1093.69 ± 11.52 ops/s. best: 1107.29ops/s.
total: 914.47 ± 9.73ms. best: 903.10ms.
avg: 0.91 ± 0.01ms
min: 0.04 ± 0.00ms
max: 2.43 ± 0.04ms
p99: 2.09 ± 0.03ms
random_route_mld 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
ops: 226.68 ± 0.56 ops/s. best: 227.49ops/s.
total: 4340.99 ± 10.59ms. best: 4325.47ms.
avg: 4.41 ± 0.01ms
min: 0.32 ± 0.00ms
max: 10.14 ± 0.52ms
p99: 7.55 ± 0.07ms

1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
ops: 225.61 ± 1.56 ops/s. best: 227.65ops/s.
total: 4432.77 ± 30.82ms. best: 4392.62ms.
avg: 4.43 ± 0.03ms
min: 0.05 ± 0.00ms
max: 10.08 ± 0.20ms
p99: 8.92 ± 0.14ms

1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
ops: 285.40 ± 0.89 ops/s. best: 286.51ops/s.
total: 3447.86 ± 10.75ms. best: 3434.49ms.
avg: 3.50 ± 0.01ms
min: 0.31 ± 0.01ms
max: 8.77 ± 0.22ms
p99: 6.13 ± 0.11ms

1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
ops: 280.93 ± 2.93 ops/s. best: 284.30ops/s.
total: 3560.15 ± 37.53ms. best: 3517.44ms.
avg: 3.56 ± 0.04ms
min: 0.04 ± 0.00ms
max: 8.02 ± 0.41ms
p99: 6.99 ± 0.08ms
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
ops: 242.56 ± 2.43 ops/s. best: 245.19ops/s.
total: 4057.16 ± 40.82ms. best: 4013.22ms.
avg: 4.12 ± 0.04ms
min: 0.33 ± 0.00ms
max: 9.01 ± 0.16ms
p99: 7.04 ± 0.18ms

1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
ops: 236.74 ± 2.10 ops/s. best: 240.21ops/s.
total: 4224.44 ± 37.38ms. best: 4163.00ms.
avg: 4.22 ± 0.04ms
min: 0.05 ± 0.00ms
max: 10.19 ± 0.63ms
p99: 8.63 ± 0.10ms

1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
ops: 323.05 ± 4.71 ops/s. best: 332.27ops/s.
total: 3046.88 ± 44.37ms. best: 2961.49ms.
avg: 3.10 ± 0.05ms
min: 0.31 ± 0.00ms
max: 7.29 ± 0.16ms
p99: 5.50 ± 0.12ms

1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
ops: 297.09 ± 1.88 ops/s. best: 299.39ops/s.
total: 3366.13 ± 21.31ms. best: 3340.18ms.
avg: 3.37 ± 0.02ms
min: 0.04 ± 0.00ms
max: 7.92 ± 0.43ms
p99: 6.65 ± 0.08ms
random_table_ch 250 tables, 3 coordinates
ops: 1388.78 ± 10.34 ops/s. best: 1396.98ops/s.
total: 180.03 ± 1.36ms. best: 178.96ms.
avg: 0.72 ± 0.01ms
min: 0.52 ± 0.00ms
max: 1.06 ± 0.29ms
p99: 0.89 ± 0.06ms

250 tables, 25 coordinates
ops: 162.02 ± 0.46 ops/s. best: 162.38ops/s.
total: 1543.06 ± 4.36ms. best: 1539.59ms.
avg: 6.17 ± 0.02ms
min: 5.62 ± 0.04ms
max: 7.03 ± 0.34ms
p99: 6.69 ± 0.03ms

250 tables, 50 coordinates
ops: 79.67 ± 0.18 ops/s. best: 79.86ops/s.
total: 3137.95 ± 7.08ms. best: 3130.52ms.
avg: 12.55 ± 0.03ms
min: 11.83 ± 0.04ms
max: 13.51 ± 0.17ms
p99: 13.36 ± 0.12ms
250 tables, 3 coordinates
ops: 1405.07 ± 9.56 ops/s. best: 1412.97ops/s.
total: 177.94 ± 1.22ms. best: 176.93ms.
avg: 0.71 ± 0.00ms
min: 0.52 ± 0.00ms
max: 1.04 ± 0.29ms
p99: 0.88 ± 0.05ms

250 tables, 25 coordinates
ops: 163.68 ± 0.28 ops/s. best: 164.08ops/s.
total: 1527.40 ± 2.60ms. best: 1523.65ms.
avg: 6.11 ± 0.01ms
min: 5.54 ± 0.04ms
max: 6.70 ± 0.07ms
p99: 6.60 ± 0.03ms

250 tables, 50 coordinates
ops: 79.92 ± 0.10 ops/s. best: 80.10ops/s.
total: 3127.98 ± 3.79ms. best: 3121.15ms.
avg: 12.51 ± 0.02ms
min: 11.80 ± 0.02ms
max: 14.01 ± 0.92ms
p99: 13.27 ± 0.06ms
random_table_mld 250 tables, 3 coordinates
ops: 347.36 ± 0.64 ops/s. best: 348.42ops/s.
total: 719.72 ± 1.35ms. best: 717.53ms.
avg: 2.88 ± 0.01ms
min: 2.27 ± 0.02ms
max: 3.98 ± 0.05ms
p99: 3.82 ± 0.04ms

250 tables, 25 coordinates
ops: 38.17 ± 0.20 ops/s. best: 38.45ops/s.
total: 6550.52 ± 33.80ms. best: 6501.60ms.
avg: 26.20 ± 0.14ms
min: 23.45 ± 0.14ms
max: 29.99 ± 0.30ms
p99: 29.02 ± 0.29ms

250 tables, 50 coordinates
ops: 17.92 ± 0.06 ops/s. best: 17.98ops/s.
total: 13954.39 ± 45.59ms. best: 13904.12ms.
avg: 55.82 ± 0.18ms
min: 52.01 ± 0.32ms
max: 62.43 ± 2.39ms
p99: 59.86 ± 0.67ms
250 tables, 3 coordinates
ops: 350.58 ± 1.67 ops/s. best: 352.66ops/s.
total: 713.12 ± 3.40ms. best: 708.89ms.
avg: 2.85 ± 0.01ms
min: 2.25 ± 0.02ms
max: 3.91 ± 0.04ms
p99: 3.73 ± 0.05ms

250 tables, 25 coordinates
ops: 38.70 ± 0.14 ops/s. best: 38.86ops/s.
total: 6460.89 ± 24.09ms. best: 6432.56ms.
avg: 25.84 ± 0.10ms
min: 23.40 ± 0.28ms
max: 29.30 ± 0.14ms
p99: 28.64 ± 0.11ms

250 tables, 50 coordinates
ops: 18.07 ± 0.03 ops/s. best: 18.13ops/s.
total: 13831.49 ± 26.66ms. best: 13792.97ms.
avg: 55.33 ± 0.11ms
min: 51.56 ± 0.33ms
max: 60.21 ± 0.79ms
p99: 59.19 ± 0.27ms
random_trip_ch 250 trips, 3 coordinates
ops: 485.75 ± 5.04 ops/s. best: 491.92ops/s.
total: 514.74 ± 5.45ms. best: 508.21ms.
avg: 2.06 ± 0.02ms
min: 1.25 ± 0.03ms
max: 3.04 ± 0.42ms
p99: 2.71 ± 0.12ms

250 trips, 5 coordinates
ops: 319.38 ± 4.19 ops/s. best: 324.21ops/s.
total: 782.96 ± 10.34ms. best: 771.11ms.
avg: 3.13 ± 0.04ms
min: 2.12 ± 0.03ms
max: 4.01 ± 0.13ms
p99: 3.84 ± 0.12ms
250 trips, 3 coordinates
ops: 480.86 ± 9.41 ops/s. best: 492.75ops/s.
total: 520.18 ± 10.26ms. best: 507.35ms.
avg: 2.08 ± 0.04ms
min: 1.24 ± 0.02ms
max: 3.03 ± 0.35ms
p99: 2.72 ± 0.12ms

250 trips, 5 coordinates
ops: 318.64 ± 2.30 ops/s. best: 321.09ops/s.
total: 784.64 ± 5.73ms. best: 778.61ms.
avg: 3.14 ± 0.02ms
min: 2.10 ± 0.01ms
max: 4.20 ± 0.18ms
p99: 3.90 ± 0.10ms
random_trip_mld 250 trips, 3 coordinates
ops: 174.27 ± 0.62 ops/s. best: 174.92ops/s.
total: 1434.60 ± 5.13ms. best: 1429.24ms.
avg: 5.74 ± 0.02ms
min: 3.75 ± 0.02ms
max: 7.90 ± 0.22ms
p99: 7.42 ± 0.08ms

250 trips, 5 coordinates
ops: 110.49 ± 2.83 ops/s. best: 113.73ops/s.
total: 2264.40 ± 58.76ms. best: 2198.19ms.
avg: 9.06 ± 0.24ms
min: 6.20 ± 0.06ms
max: 11.58 ± 0.51ms
p99: 11.13 ± 0.40ms
250 trips, 3 coordinates
ops: 170.29 ± 2.69 ops/s. best: 173.01ops/s.
total: 1468.65 ± 25.30ms. best: 1444.96ms.
avg: 5.87 ± 0.10ms
min: 3.78 ± 0.07ms
max: 8.72 ± 1.28ms
p99: 7.71 ± 0.24ms

250 trips, 5 coordinates
ops: 110.63 ± 0.95 ops/s. best: 111.85ops/s.
total: 2260.07 ± 19.43ms. best: 2235.22ms.
avg: 9.04 ± 0.08ms
min: 6.18 ± 0.04ms
max: 12.14 ± 0.87ms
p99: 11.21 ± 0.13ms
route_ch 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
411.548ms
0.411548ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
499.233ms
0.499233ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
147.967ms
0.147967ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
129.155ms
0.129155ms/req
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
418.392ms
0.418392ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
498.81ms
0.49881ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
147.393ms
0.147393ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
129.306ms
0.129306ms/req
route_mld 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
550.797ms
0.550797ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
695.519ms
0.695519ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
270.696ms
0.270696ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
295.994ms
0.295994ms/req
1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
555.72ms
0.55572ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
696.923ms
0.696923ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
270.844ms
0.270844ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
293.869ms
0.293869ms/req
rtree 1 result:
197.946ms -> 0.0197946 ms/query
10 results:
233.146ms -> 0.0233146 ms/query
1 result:
197.813ms -> 0.0197813 ms/query
10 results:
233.117ms -> 0.0233117 ms/query

@@ -17,6 +17,7 @@ Checks: >
-bugprone-incorrect-enable-if,
-bugprone-switch-missing-default-case,
-bugprone-empty-catch,
-bugprone-unchecked-optional-access,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to have too much false positives - at least I couldn't understand why it fires in vast majority of places where we have it now...

@SiarheiFedartsou SiarheiFedartsou changed the title Yet another attempt to get rid of boost::optional Get rid of boost::optional leftovers Jun 30, 2024
};

const auto add_approach = [](engine::api::BaseParameters &base_parameters,
boost::optional<osrm::engine::Approach> approach) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 lambdas in this grammar is single place where we have boost::optional left - just because Boost Spirit doesn't work well with std::optional, so we use boost::optional here and immediately convert it to std::optional

@SiarheiFedartsou SiarheiFedartsou marked this pull request as ready for review June 30, 2024 19:29
@@ -382,20 +382,20 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
std::vector<PhantomNodeWithDistance>
NearestPhantomNodes(const util::Coordinate input_coordinate,
const size_t max_results,
const boost::optional<double> max_distance,
const boost::optional<Bearing> bearing,
const std::optional<double> max_distance,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing an optional is arguably cheap, but would it make sense to just pass a const ref?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, tbh I believe for primitive like double it won't make any difference(or even make things a bit worse due to indirection)... WDYT?

@SiarheiFedartsou
Copy link
Member Author

@DennisOSRM thanks for reviewing this, will you have a time to also review these not really big PRs? 🙏🏻

#6975
#6968
#6922

@DennisOSRM
Copy link
Collaborator

I am traveling this week. The plan is to get to it the next couple of days.

@SiarheiFedartsou SiarheiFedartsou merged commit 57b792c into master Jul 2, 2024
22 checks passed
@SiarheiFedartsou SiarheiFedartsou deleted the sf-boost-optional-to-std branch July 2, 2024 20:37
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