C++ Logo


Advanced search

Is there any hope of getting more granular std lib (e.g. chrono is currently huge compile hit even when I need only small part of it)

From: Ivan Matek <libbooze_at_[hidden]>
Date: Tue, 12 Oct 2021 01:35:10 +0200
recently I noticed that removing accidentally included <chrono> in common
header reduced compile time by 10%. I know about tools like IWYU, but
a) they dont always work
b) in cases when I need something simple from a header(e.g. chrono
nanoseconds or unique_ptr I have to include entire chrono/memory)

Are there any proposals that might make this easier to manage?
Either more granular headers like <smart_ptr> <chrono_types> or something
with fwd declarations maybe(although not sure if that would help with
template heavy code like std:: implementations)

P.S. this is nothing against chrono, it's C++20 additions are amazing, but
they just seem to kill compile times.

Received on 2021-10-11 18:35:24