ARROW-7785: [C++] Improve compilation performance of sparse tensor related code#6533
ARROW-7785: [C++] Improve compilation performance of sparse tensor related code#6533mrkn wants to merge 7 commits intoapache:masterfrom
Conversation
|
This is the result of ClangBuildAnalyzer. Before: After: |
|
Would you have the timings in release mode? |
|
This is the result on release mode. I need additional work to reduce the codegen time of Before: After: |
|
Yes, the main problem is the codegen time in this case. I would hope it's possible to make some portions non-templated and only keep the hot conversion loops as template functions. |
|
Finally, I got the following result. |
|
@pitrou Could you review this again? |
There was a problem hiding this comment.
I added a commit to fix for IWYU, but the following reports are remaining. I guess these reports are false positive.
include-what-you-use 0.13 (git:06e88ef) based on clang version 9.0.0-2~ubuntu18.04.2 (tags/RELEASE_900/final)
/home/mrkn/src/github.com/apache/arrow/cpp/src/arrow/tensor/csf_converter.cc should add these lines:
namespace arrow { template <typename T, typename Enable = void> class TypedBufferBuilder; }
/home/mrkn/src/github.com/apache/arrow/cpp/src/arrow/tensor/csf_converter.cc should remove these lines:
- #include "arrow/buffer_builder.h" // lines 27-27
|
@wesm Thank you for reviewing this. I've added commits to fix things you pointed out. |
wesm
left a comment
There was a problem hiding this comment.
+1 I fixed the linting issues and did some minor cleaning of the includes. Thanks for addressing my comments!
|
Here's an appveyor build on my fork: https://ci.appveyor.com/project/wesm/arrow/builds/31299374 |
Extract
SparseTensorConverterrelated things fromsparse_tensor.cctotensor/converter.ccand break into multiple compilation units which can be compiled in parallel. This should reduce the code wall clock time of compilingsparse_tensor.cc.