C++ Logo

std-discussion

Advanced search

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

From: Richard Hodges <hodges.r_at_[hidden]>
Date: Thu, 9 Jul 2020 09:11:34 +0200
On Thu, 9 Jul 2020 at 08:23, Artur Czajkowski via Std-Discussion <
std-discussion_at_[hidden]> 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.
>

To be fair, I completely understand your view as I used to share it. Users
of C++ are certainly frustrated by the apparent opaqueness of the
standardisation process.

There is a counter position, that C++ has only survived because of the time
and effort put in by the individuals who make up the “committee”.

Most of these people care deeply about the language. Often to the extent
where progress is not made in case of “acting in haste, repenting at
leisure”.

Not all of these people agree with each other on all design and
implementation decisions. Or even for that matter on whether a feature
should be in the language.

I think that one of the benefits of the headless, collegiate approach is
that matters get discussed thoroughly and the overall discipline of
computer languages is furthered (although sadly often behind closed doors,
so the wider user base do not witness and therefore benefit from the
knowledge gained during these sessions).

One of the downsides is that there is no firm leader who can say, “the
users have spoken - they shall have their feature”, which is entirely
possible in a proprietary language owned exclusively by a huge corporation.

Also there is no way for the user base to communicate the features they
need to WG21, other than writing a paper - which is a specialised skill in
itself.

It’s important to understand that writing compilers is not a
profit-motivated activity.

(Almost) nobody has paid for a compiler since the turn of the millennium.
Every program you compile is courtesy of some individual or corporation who
chose to donate time and/or money.

For this reason, there is no fundamental driver for providing “customer
service”. Customer service is a tool for gaining competitive advantage in a
contested marketplace. It’s not a fundamental right of humanity.

Out of interest, what feature do you think c++ most sorely lacks?

>
>
> On Thu, Jul 9, 2020 at 3:53 AM Thiago Macieira via Std-Discussion <
> 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 - thiago (AT) 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
>
-- 
Richard Hodges
hodges.r_at_[hidden]
office: +442032898513
home: +376841522
mobile: +376380212

Received on 2020-07-09 02:46:20