From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2024-10-08 17:18:00


On 10/8/24 20:01, Vinnie Falco via Boost wrote:
> On Tue, Oct 8, 2024 at 9:56 AM Kostas Savvidis <kotika98_at_[hidden]> wrote:
>
>> There are some libraries, including but not limited to the below that
>> contain code I would be ashamed of showing in public by 2030.
>> Some of those headers are 2,3,5 MB large. The "Slow compilation" complaint
>> might be related to those.
>> Is there nothing that can be done about this in the next six years?
>
> Judging by the example code which you quoted, I would guess that these
> things have never been optimized. That is, optimized for compilation speed.

I believe, such code was actually the result of optimization. In C++03,
preprocessed code like this is faster to compile than to generate it
using preprocessor.

Yes, in C++11 we got variadic templates, but updating to those is not
always trivial, and someone has to do it. And the compilation time wins
are also not guaranteed after the conversion.