You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the PR! Could you check how these flags compare to configuring CMake with -DCMAKE_BUILD_TYPE=Release?
It might be necessary to place these compile flags in the if(NOT WIN32) block starting on the next line if there are incompatabilities with MSVC. Would it make sense to enable these flags only for Release builds?
kom@nucat:~/proj/h3/build$ bin/benchmarkH3Api
-- geoToH3: 0.517386 microseconds per iteration (10000 iterations)
-- h3ToGeo: 0.295042 microseconds per iteration (10000 iterations)
-- h3ToGeoBoundary: 1.496694 microseconds per iteration (10000 iterations)
with this PR:
kom@nucat:~/proj/h3/build$ bin/benchmarkH3Api
-- geoToH3: 0.432304 microseconds per iteration (10000 iterations)
-- h3ToGeo: 0.257581 microseconds per iteration (10000 iterations)
-- h3ToGeoBoundary: 1.376957 microseconds per iteration (10000 iterations)
Things get inlined this way, but with this PR it's somehow even faster. Seems -DCMAKE_BUILD_TYPE=Release is a secret black magic that needs to be at least documented, and defaulted if possible. At least postgis/h3-pg#23 got hit by it, and likely many others.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
without inlining:
with inlining:
Addresses #325.