Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: bart Newsgroups: comp.lang.c Subject: Re: Suggested method for returning a string from a C program? Date: Wed, 26 Mar 2025 10:07:05 +0000 Organization: A noiseless patient Spider Lines: 39 Message-ID: References: <87ecyrs332.fsf@nosuchdomain.example.com> <20250320171505.221@kylheku.com> <8734f7rw7z.fsf@nosuchdomain.example.com> <87tt7mqk7w.fsf@nosuchdomain.example.com> <87cye9afl0.fsf@nosuchdomain.example.com> <871puoag2q.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 26 Mar 2025 11:07:06 +0100 (CET) Injection-Info: dont-email.me; posting-host="b1044a3401b57bc3da2b217ca554eee5"; logging-data="1587000"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ym0HnMTtZJ3t6dnukVUcF" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:6y0HuC3SwxzTiZ3MztxIS2/T4hM= Content-Language: en-GB In-Reply-To: Bytes: 3535 On 26/03/2025 09:20, Muttley@DastardlyHQ.org wrote: > On Tue, 25 Mar 2025 16:40:38 +0000 > bart wibbled: >> On 25/03/2025 15:09, Muttley@DastardlyHQ.org wrote: >> >>> You're the one extolling the virtues of a single source file, not me. >>> >>> Here's an idea - instead of outputting C why don't you make it output >>> machine code instead. Might be more useful. >> >> >> What makes you think I don't? The C code is mainly for people who can't >> or won't run Windows binaries. It also makes it incredibly easy to build >>from source (gcc prog.c). >> >> In my case I want to apply gcc-level optimisations that my compiler >> doesn't do. So it has to be C code if I want that final 25% extra speed. > > Whats this? You mean your amazing zippy fast compiler can't optimise for shit? Well, it is compiled with itself and it manages that in 70ms despite lacking the optimiser. Otherwise it might do it it 60ms. It is amazingly fast either way. > Maybe gcc isn't so bad after all eh? I'm not complaining about the quality of its code. However, it is 200 times bigger than my product, and can take 100 times longer to compile code, which in the current project might yield 10-25% extra speed. That is only needed here because I'm compiling benchmark results to compare with other products that will also be using the best possible optimisation. For everyday use however, that small boost is not relevant, and not worth the extra hassle.