-
Notifications
You must be signed in to change notification settings - Fork 373
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
Improve C++ SDK perf 5x by respecting CMAKE_BUILD_TYPE and enabling mimalloc #4094
Conversation
Let's make sure this works on Mac & Windows before mergning |
|
rerun_cpp/CMakeLists.txt
Outdated
--preset ninja-debug-minimal | ||
-DARROW_IPC=ON | ||
-DARROW_BOOST_USE_SHARED=OFF | ||
-DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED} | ||
-DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC} | ||
-DCMAKE_INSTALL_PREFIX=${ARROW_DOWNLOAD_PATH} | ||
-DARROW_CXXFLAGS=${DARROW_CXXFLAGS} | ||
-DARROW_IPC=ON | ||
-DARROW_JEMALLOC=OFF | ||
-DARROW_MIMALLOC=ON | ||
-DARROW_USE_ASAN=OFF | ||
-DARROW_USE_TSAN=OFF | ||
-DARROW_USE_UBSAN=OFF | ||
-DARROW_JEMALLOC=OFF | ||
-Dxsimd_SOURCE=BUNDLED | ||
-DBOOST_SOURCE=BUNDLED | ||
-DARROW_BOOST_USE_SHARED=OFF | ||
-DARROW_CXXFLAGS=${DARROW_CXXFLAGS} | ||
-DCMAKE_BUILD_TYPE=${ARROW_CMAKE_BUILD_TYPE} | ||
-DCMAKE_INSTALL_PREFIX=${ARROW_DOWNLOAD_PATH} | ||
-Dxsimd_SOURCE=BUNDLED |
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.
We should sort these defines if their order doesn't matter
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.
This PR sorts them.
…BUILD_TYPE for debug/release
oh wow. CRLF strikes again. my settings are broken |
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.
fixed for windows now, didn't run benchmarks though, only made sure build all & tests work
tip: there are global git settings you can set regarding CRLF |
I know, that's the strange thing, I set |
rerun_cpp/src/rerun/demo_utils.hpp
Outdated
@@ -30,7 +30,7 @@ namespace rerun { | |||
inline std::vector<T> linspace(T start, T end, size_t num) { | |||
std::vector<T> linspaced(num); | |||
std::generate(linspaced.begin(), linspaced.end(), [&, i = 0]() mutable { | |||
return start + static_cast<T>(i++) * (end - start) / static_cast<T>(num - 1); | |||
return static_cast<T>(start + static_cast<T>(i++) * (end - start) / static_cast<T>(num - 1)); |
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.
this makes no sense to me - isn't this casting T
to T
? Are you sure this is needed?
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.
Yeah it's this weird quirk of C++ where char + char == int
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.
(you know that weird quirk. Not like the others)
Bites me every time!
https://godbolt.org/z/4W8xYnqKq
actually only works with unsigned char, which is also the case I got a warning in (uint8_t)
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.
God damn you C++
What
Arrow was default to a Debug build regardless of what CMAKE_BUILD_TYPE was specified.
Baseline:
CMAKE_BUILD_TYPE=RelWithDebInfo
-DARROW_MIMALLOC=ON
Test
Checklist