cudf
cudf copied to clipboard
Compile times are growing significantly
Feature request
As anyone who has built libgdf recently has surely noticed, the time to compile the library from scratch has grown significantly in the last few months. For example, compiling on all 10 cores of my i9-7900X @ 3.30GHz takes 11 minutes as reported by time make -j
.
Compiling with -ftime-report
may be a good place to start to see where all the compilation time is being spent.
This is likely due to the large amount of template instantiation that is required for instantiating functions for all possible types. We should make sure that best practices are being followed in template instantiation such that a template for a given type is only having to be instantiated once via explicit instantiation.
Much of our code is implemented in headers, which causes it to be recompiled everywhere that header is included. Using pre-compiled headers may help: https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html http://itscompiling.eu/2017/01/12/precompiled-headers-cpp-compilation/
Furthermore, code should be scrubbed from excessive and unnecessary #include
s. Compiling with -MD
will show what files are being included
Here's a Clang tool that ensures you only include the necessary headers: https://github.com/include-what-you-use/include-what-you-use
Here's a Clang tool to profile time spent in template instantiation: https://github.com/mikael-s-persson/templight