Deutsch   English   Français   Italiano  
<vhptmn$3mlgf$1@paganini.bofh.team>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!feeds.phibee-telecom.net!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: antispam@fricas.org (Waldek Hebisch)
Newsgroups: comp.lang.c
Subject: Re: else ladders practice
Date: Fri, 22 Nov 2024 12:33:29 -0000 (UTC)
Organization: To protect and to server
Message-ID: <vhptmn$3mlgf$1@paganini.bofh.team>
References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org>   <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> <WGl%O.42744$LlWc.33050@fx42.iad> <vhkr9e$4bje$1@dont-email.me>
Injection-Date: Fri, 22 Nov 2024 12:33:29 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="3888655"; posting-host="WwiNTD3IIceGeoS5hCc4+A.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
X-Notice: Filtered by postfilter v. 0.9.3
Bytes: 2474
Lines: 29

Bart <bc@freeuk.com> wrote:
> 
> Sure. That's when you run a production build. I can even do that myself 
> on some programs (the ones where my C transpiler still works) and pass 
> it through gcc-O3. Then it might run 30% faster.

On fast machine running Dhrystone 2.2a I  get:

tcc-0.9.28rc    20000000
gcc-12.2 -O     64184852
gcc-12.2 -O2    83194672
clang-14 -O     83194672
clang-14 -O2    85763288

so with 02 this is more than 4 times faster.  Dhrystone correlated
resonably with runtime of tight compute-intensive programs.
Compiler started to cheat on original Dhrystone, so there are
bigger benchmarks like SPEC INT.  But Dhrystone 2 has modifications
to make cheating harder, so I think it is still reasonable
benchmark.  Actually, difference may be much bigger, for example
in image processing both clang and gcc can use vector intructions,
with may give additional speedup of order 8-16.

30% above means that you are much better than tcc or your program
is badly behaving (I have programs that make intensive use of
memory, here effect of optimization would be smaller, but still
of order 2).

-- 
                              Waldek Hebisch