| Deutsch English Français Italiano |
|
<87ldsoww41.fsf@nosuchdomain.example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Suggested method for returning a string from a C program?
Date: Fri, 28 Mar 2025 16:53:18 -0700
Organization: None to speak of
Lines: 36
Message-ID: <87ldsoww41.fsf@nosuchdomain.example.com>
References: <vrd77d$3nvtf$2@dont-email.me> <vrs7oi$1e2j7$1@dont-email.me>
<vrtq62$2unrb$1@dont-email.me> <vru2t0$35frt$2@dont-email.me>
<vrufju$3i02s$1@dont-email.me> <vrugmo$3ij4s$2@dont-email.me>
<vrugut$3j3ah$1@dont-email.me> <vruma5$3mvbj$2@dont-email.me>
<vs0gsh$1en04$1@dont-email.me> <20250326110011.634@kylheku.com>
<vs25oi$2pqb$1@paganini.bofh.team>
<QadFP.1351322$zz8b.870017@fx09.iad> <86r02iicl3.fsf@linuxsc.com>
<JUzFP.529511$f81.413611@fx48.iad> <vs6jeh$31p79$3@dont-email.me>
<dQDFP.256596$D_V4.171478@fx39.iad> <vs7788$3ml6o$1@dont-email.me>
<87pli0wztv.fsf@nosuchdomain.example.com>
<vs78vb$3o6s2$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Sat, 29 Mar 2025 00:53:23 +0100 (CET)
Injection-Info: dont-email.me; posting-host="f0415a4398843ff1d018d36633e5e00b";
logging-data="4047271"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188VD+IL/D+JF61qrNqKlFw"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:/733eYyNJjz4QUvNjy6beyrrOdQ=
sha1:eb80h99ZKHySHa1iFCfLBnjvhfU=
Bytes: 3062
bart <bc@freeuk.com> writes:
> On 28/03/2025 22:33, Keith Thompson wrote:
>> bart <bc@freeuk.com> writes:
>>> On 28/03/2025 20:41, Scott Lurndal wrote:
>> [...]
>>>> The gnu compiler is not multithreaded. The single thread was
>>>> compute bound for 13 minutes and 46 seconds.
>>>
>>> So what was that -j96 about?
>> "-j96" is an option to GNU make, not to the compiler. It might
>> invoke
>> gcc multiple times in parallel, but each invocation of gcc will still be
>> single-threaded.
>
> So, is there just once instance of gcc at work during those 13
> minutes, or multiple?
>
> In other words, would it take longer than 13:40 mins without it, or
> does it help? If -j96 makes no difference, then why specify it?
I haven't done any measurements, but I don't know what's unclear.
If a single thread was compute bound for 13:46, using "-j96"
won't make that single thread run any faster, but it can enable
"make" to do other things while that single thread is running.
It's also common to use "-j" without an argument, to run as many
jobs simultaneously as possible, or "-j$(nproc)" to run as many
parallel jobs as the number of processing units available (if you
have the "nproc" command; it's part of GNU coreutils).
I can imagine "-j" causing problems if dependencies are expressed
incorrectly, but I haven't run into such a problem myself.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */