Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Suggested method for returning a string from a C program?
Date: Fri, 28 Mar 2025 10:57:42 -0700
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <86msd5hwbt.fsf@linuxsc.com>
References: <20250326110011.634@kylheku.com> <86r02iicl3.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Fri, 28 Mar 2025 18:57:45 +0100 (CET)
Injection-Info: dont-email.me; posting-host="2348fc5651602b9720056b39b4ee415b";
logging-data="3436107"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX197tIWgIGmv5PAIqImViCBdaykWY9rfrys="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:8MWIgXvwa50w8cl9NU6E0ijtsoI=
sha1:TigdT+L3Mk4qA8BKwsvUAq2b0GE=
Bytes: 2834
scott@slp53.sl.home (Scott Lurndal) writes:
> Tim Rentsch writes:
>
>> scott@slp53.sl.home (Scott Lurndal) writes:
>>
>>> [...] I have one
>>> source file that takes almost 7 minutes to compile
>>> when using -O3 on a very-high-end xeon box. Mostly
>>> buried in the overall compile time when using parallel
>>> make.
>>>
>>> The code could be restructured to compile in a few seconds;
>>> but that would require substantial changes to the rest
>>> of the codebase. Compiling with -O0 for development
>>> testing reduces the compile time to a few seconds.
>>
>> How long does it take compiling with -O1?
>
> Using -O1 saves 14 seconds on the long-pole.
>
>
> $ time mr -s -j96
> COMPILE g.cpp
> BUILD lib/lib_g.so
> BUILDSO libsim.so.1.0
> BUILD TARGET sim
>
> real 14m0.76s
> user 13m52.28s
> sys 0m20.13s
>
> $ time md -s -j96
> COMPILE g.cpp
> BUILD lib_g.so
> BUILDSO libsim.so.1.0
> BUILD TARGET sim
>
> real 13m46.49s
> user 13m42.17s
> sys 0m16.66s
>
> To be clear, we know that this is ridiculous, the generated
> header file totals 1.25 million lines, including a single
> function with over 200,000 SLOC. Feature creep, antique
> algorithms, screwed up third-party ip-xact collateral and
> tight development schedules.
Thank you. I was just curious.