DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
Posted Apr 5, 2018 17:10 UTC (Thu) by excors (subscriber, #95769)In reply to: DNF 3: better performance and a move to C++ by zlynx
Parent article: DNF 3: better performance and a move to C++
On the other hand, something like https://www.boost.org/doc/libs/1_66_0/libs/spirit/example... takes (on my reasonable CPU) 7 seconds to compile a single small source file with g++ -O0. Spirit is absurdly bad for this, but other libraries that make heavy use of fancy templates can be pretty expensive too, and it's an aspect of library design that is often completely ignored. (https://github.com/fmtlib/fmt#benchmarks is one of the few places I've seen compile time benchmarks given the same prominence as runtime benchmarks.)
That's certainly a manageable problem (you can design libraries in ways that don't involve enormous amounts of inline template code), but it takes a bit of knowledge and discipline to make sure you avoid dependencies that significantly hurt your project's compile times.