| Deutsch English Français Italiano |
|
<vi9ukc$ib2v$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Bart <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: else ladders practice Date: Thu, 28 Nov 2024 14:27:25 +0000 Organization: A noiseless patient Spider Lines: 70 Message-ID: <vi9ukc$ib2v$1@dont-email.me> References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org> <vg37nr$3bo0c$1@dont-email.me> <vg3b98$3cc8q$1@dont-email.me> <vg5351$3pada$1@dont-email.me> <vg62vg$3uv02$1@dont-email.me> <vgd3ro$2pvl4$1@paganini.bofh.team> <vgdc4q$1ikja$1@dont-email.me> <vgdt36$2r682$2@paganini.bofh.team> <vge8un$1o57r$3@dont-email.me> <vgpi5h$6s5t$1@paganini.bofh.team> <vgtsli$1690f$1@dont-email.me> <vhgr1v$2ovnd$1@paganini.bofh.team> <vhic66$1thk0$1@dont-email.me> <vhins8$1vuvp$1@dont-email.me> <vhj7nc$2svjh$1@paganini.bofh.team> <vhje8l$2412p$1@dont-email.me> <86y117qhc8.fsf@linuxsc.com> <vi2m3o$2vspa$1@dont-email.me> <86cyiiqit8.fsf@linuxsc.com> <vi4iji$3f7a3$1@dont-email.me> <86mshkos1a.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 28 Nov 2024 15:27:25 +0100 (CET) Injection-Info: dont-email.me; posting-host="033a1fb1a70fe4f5596322438ef79f57"; logging-data="601183"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+js5TBEzVlniRAVZupVwpA" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:bcJyKLUN1WHoWxlz2VDACFz2Olw= Content-Language: en-GB In-Reply-To: <86mshkos1a.fsf@linuxsc.com> Bytes: 4551 On 28/11/2024 05:18, Tim Rentsch wrote: > Bart <bc@freeuk.com> writes: > >> On 26/11/2024 12:29, Tim Rentsch wrote: >> >>> Bart <bc@freeuk.com> writes: >>> >>>> On 25/11/2024 18:49, Tim Rentsch wrote: >>>> >>>>> Bart <bc@freeuk.com> writes: >>>>> >>>>>> It's funny how nobody seems to care about the speed of compilers >>>>>> (which can vary by 100:1), but for the generated programs, the 2:1 >>>>>> speedup you might get by optimising it is vital! >>>>> >>>>> I think most people would rather take this path (these times >>>>> are actual measured times of a recently written program): >>>>> >>>>> compile time: 1 second >>>>> program run time: ~7 hours >>>>> >>>>> than this path (extrapolated using the ratios mentioned above): >>>>> >>>>> compile time: 0.01 second >>>>> program run time: ~14 hours >>>> >>>> I'm trying to think of some computationally intensive app that would >>>> run non-stop for several hours without interaction. >>> >>> The conclusion is the same whether the program run time >>> is 7 hours, 7 minutes, or 7 seconds. >> >> Funny you should mention 7 seconds. If I'm working on single source >> file called sql.c for example, that's how long it takes for gcc to >> create an unoptimised executable: >> >> c:\cx>tm gcc sql.c #250Kloc file >> TM: 7.38 > > Your example illustrates my point. Even 250 thousand lines of > source takes only a few seconds to compile. Only people nutty > enough to have single source files over 25,000 lines or so -- > over 400 pages at 60 lines/page! -- are so obsessed about > compilation speed. And of course you picked the farthest-most > outlier as your example, grossly misrepresenting any sort of > average or typical case. It's not atypical for me! I explained why I might use such a file. And for me, used to decades of sub-one-second response times, 7 seconds seems like for ever. Especially when there is no feedback at all from gcc. When my tools had to compile multiple modules they would show a progress report as each one was processed. gcc says nothing (unless you use --verbose then it spews reams of junk for every file). Maybe after a few seconds it's 90% done, or maybe 10%; who knows? Also, you haven't really explained why someone should wait an extra 7 seconds for a task that can clearly be accomplished in a fraction of second, given that gcc-O0 generates equally poor code. Nor why a production version of gcc needs to be itself built with -O3 anyway. Since it sounds like an unoptimised version would only ever take an extra second or two on any of your tiny inputs! (And with David Brown's projects where apparently the gcc compiler is either never invoked, or always finishes in milliseconds, it would make no measurable difference at all.)