-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Use C++20 #6877
Use C++20 #6877
Conversation
- name: Install Boost | ||
if: steps.cache-boost.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON' | ||
run: | | ||
BOOST_VERSION="1.85.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were problems with Boost from apt on Ubuntu 22.04, so I propose to install it manually for the time being.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a switch to 24.04 make this easier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, with a switch to 24.04 I had another challenge: sol2 is not compiling with newest clang we would have to switch to on 24.04. There is already fix in LLVM, so I believe it is just easier to wait for a while until this fix will come to GitHub Actions runner image for 24.04 and switch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is only going to make it to clang 19, unfortunately.
@@ -82,6 +83,7 @@ Checks: > | |||
-readability-make-member-function-const, | |||
-readability-redundant-string-init, | |||
-readability-non-const-parameter, | |||
-readability-container-contains, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a ticket into the backlog to fix these warnings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, #6902
- name: Install Boost | ||
if: steps.cache-boost.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON' | ||
run: | | ||
BOOST_VERSION="1.85.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a switch to 24.04 make this easier?
Great change! |
I believe it is a time to bump C++ standard in this project. It has quite a lot of useful things OSRM can benefit from(e.g. std::span and also I see that even
json_render
benchmark became better due to some reason :) ). I hope there are no objections for this.Benchmark Results
plain u32: 1092.11
aliased double: 960.248
plain double: 947.363
plain u32: 1089.74
aliased double: 959.988
plain double: 948.72
Stringstream: 11.5894ms
Vector: 7.47187ms
Stringstream: 10.5255ms
Vector: 6.62243ms
4.43728ms/req at 82 coordinate
0.0541131ms/coordinate
Radius 5m:
4.43271ms/req at 82 coordinate
0.0540574ms/coordinate
Radius 10m:
15.0005ms/req at 82 coordinate
0.182933ms/coordinate
Radius 15m:
36.5988ms/req at 82 coordinate
0.446327ms/coordinate
Radius 30m:
312.388ms/req at 82 coordinate
3.80961ms/coordinate
4.53578ms/req at 82 coordinate
0.0553144ms/coordinate
Radius 5m:
4.53172ms/req at 82 coordinate
0.0552649ms/coordinate
Radius 10m:
15.343ms/req at 82 coordinate
0.18711ms/coordinate
Radius 15m:
37.2938ms/req at 82 coordinate
0.454803ms/coordinate
Radius 30m:
319.071ms/req at 82 coordinate
3.89112ms/coordinate
2.88705ms/req at 82 coordinate
0.035208ms/coordinate
Radius 5m:
2.80234ms/req at 82 coordinate
0.0341749ms/coordinate
Radius 10m:
10.1313ms/req at 82 coordinate
0.123553ms/coordinate
Radius 15m:
25.6745ms/req at 82 coordinate
0.313104ms/coordinate
Radius 30m:
297.859ms/req at 82 coordinate
3.63243ms/coordinate
2.87119ms/req at 82 coordinate
0.0350145ms/coordinate
Radius 5m:
2.86241ms/req at 82 coordinate
0.0349074ms/coordinate
Radius 10m:
10.4629ms/req at 82 coordinate
0.127596ms/coordinate
Radius 15m:
26.7566ms/req at 82 coordinate
0.3263ms/coordinate
Radius 30m:
314.468ms/req at 82 coordinate
3.83497ms/coordinate
std::vector 9813.3 ms
util::packed_vector 74360.7 ms
slowdown: 7.57755
random read:
std::vector 8675.09 ms
util::packed_vector 30857.7 ms
slowdown: 3.55704
std::vector 9754.69 ms
util::packed_vector 81460.1 ms
slowdown: 8.35087
random read:
std::vector 8478.48 ms
util::packed_vector 31332 ms
slowdown: 3.69548
597.456ms
0.597456ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
379.2ms
0.3792ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
763.511ms
0.763511ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
161.229ms
0.161229ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
103.889ms
0.103889ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
146.011ms
0.146011ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
161.279ms
0.161279ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
103.87ms
0.10387ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
144.998ms
0.144998ms/req
596.23ms
0.59623ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
376.829ms
0.376829ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
763.386ms
0.763386ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
161.562ms
0.161562ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
104.426ms
0.104426ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
144.873ms
0.144873ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
160.242ms
0.160242ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
104.019ms
0.104019ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
144.505ms
0.144505ms/req
722.484ms
0.722484ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
467.443ms
0.467443ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
946.061ms
0.946061ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
280.552ms
0.280552ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
168.964ms
0.168964ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
304.268ms
0.304268ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
280.978ms
0.280978ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
168.926ms
0.168926ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
300.273ms
0.300273ms/req
727.123ms
0.727123ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
469.123ms
0.469123ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
956.257ms
0.956257ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
286.806ms
0.286806ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
167.625ms
0.167625ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
306.994ms
0.306994ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
280.106ms
0.280106ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
167.448ms
0.167448ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
305.274ms
0.305274ms/req
208.935ms -> 0.0208935 ms/query
10 results:
244.479ms -> 0.0244479 ms/query
207.379ms -> 0.0207379 ms/query
10 results:
242.495ms -> 0.0242495 ms/query