C++ Logo

std-discussion

Advanced search

Re: extremely long compile time with large number of string literals

From: Marcin Jaczewski <marcinjaczewski86_at_[hidden]>
Date: Thu, 9 Jul 2020 10:51:01 +0200
czw., 9 lip 2020 o 10:38 Artur Czajkowski via Std-Discussion <
std-discussion_at_[hidden]> napisaƂ(a):

> @Bo Persson
> Then you should correct Thiago Maciera, he is the one that adamantly and
> arrogantly states that:
> > " The standard doesn't
> > care if the algorithms rerquired to implement it are quadratic or cubic
> or
> > exponential. " [Misspelling original]
>
>


This is important thing, this reduces a lot cost of creating new conforming
compilers.
With more options available you can always choose one that fits your needs.
Even if committee decide that compiler shall do something then some cannot
do it because
its whole code base cannot support it (fixing it would require rewriting
from scratch all data structures and logic).
This means you will endup with a non conforming compiler.

If fixing is easy then you can ask your compiler provider to fix it or if
its open source fix it yourself.


@Mandeep Sandhu
Beside, question is if a better way would be to use some UDL or Raw string
literals could handle this case better?





> On Thu, Jul 9, 2020 at 10:26 AM Bo Persson via Std-Discussion <
> std-discussion_at_[hidden]> wrote:
>
>> On 2020-07-09 at 08:22, Artur Czajkowski via Std-Discussion wrote:
>> >
>> > @Thiago Macieira via Std-Discussion
>> >
>> > " The standard doesn't
>> > care if the algorithms rerquired to implement it are quadratic or cubic
>> or
>> > exponential. " [Misspelling original]
>> > Pity, because standard should care about things of such importance.
>> > You (the committee) are destroying the C++ language.
>>
>> The committee *does* specify how the algorithms exposed in the standard
>> library are supposed to work.
>>
>> It doesn't tell you how to write a compiler.
>>
>>
>> >
>> > On Thu, Jul 9, 2020 at 3:53 AM Thiago Macieira via Std-Discussion
>> > <std-discussion_at_[hidden]
>> > <mailto:std-discussion_at_[hidden]>> wrote:
>> >
>> > On Wednesday, 8 July 2020 18:39:35 PDT Mandeep Sandhu via
>> > Std-Discussion
>> > wrote:
>> > > Can someone explain to me why it takes such a long time to
>> compile?
>> > > Keeping the strings to under 5K, makes the program compile in
>> about 8
>> > > secs.
>> >
>> > You should ask that question in the GCC mailing list. The standard
>> > has nothing
>> > to do with how long compilers take to compile anything. The standard
>> > doesn't
>> > care if the algorithms rerquired to implement it are quadratic or
>> > cubic or
>> > exponential.
>> >
>> > Suggestion: since this is clearly a generated file, instead of using
>> > std::unordered_set, use the gperf application or another perfect
>> hash
>> > generator.
>> >
>> > --
>> > Thiago Macieira - thiago (AT) macieira.info <http://macieira.info>
>> -
>> > thiago (AT) kde.org <http://kde.org>
>> > Software Architect - Intel System Software Products
>> >
>>
>> --
>> Std-Discussion mailing list
>> Std-Discussion_at_[hidden]
>> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>>
>
>
> --
>
>
> Best regards
> *Artur Czajkowski*
>
> https://marketplace.visualstudio.com/items?itemName=GitAtomic.GitAtomic
>
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>

Received on 2020-07-09 03:54:26