Subject: Re: extremely long compile time with large number of string literals
From: Roman Babinicz (rb_at_[hidden])
Date: 2020-08-05 11:08:02
On 09/07/2020 08:22, Artur Czajkowski via Std-Discussion wrote:
> You (the committee) are destroying the C++ language.
Your anger is misplaced, it is the developers of compiler who decide how
efficient and fast the compilation will be.
There is nothing in the standard that would make it extra hard to write
a compiler that compiles such code in efficient manner;
E.g. if standard would require that two string literals share some
address or otherwise "foo"=="foo" is always true, then it might require
additional step, that sounds quadratic O(nÂ²) in naive implementation.
Perhaps there are GCC options related to string compilation, maybe GCC
tries to optimize identical strings and spends time doing just that or
Contact GCC developers, or perhaps use other compiler like clang.
STD-DISCUSSION list run by email@example.com
Older Archives on Google Groups