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: References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org> 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 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