Re: a small C (naive) program faster with clang than with gcc

2023-04-25 Thread Gabriel Paubert
On Tue, Apr 25, 2023 at 06:01:22PM +0200, Andy via Gcc wrote: > I see it in godbolt > GCC compiles to: > movsx eax, BYTE PTR [rdi+2] > cmp al, 9 > ja .L42 > Clang: > movzx edx, byte ptr [rdi + 2] > cmp edx, 9 > ja .LBB0_40 > > > GCC extend with sign, Clang with zero. > cmp with 32 bit register is

Re: a small C (naive) program faster with clang than with gcc

2023-04-25 Thread LIU Hao via Gcc
在 2023/4/26 00:01, Andy via Gcc 写道: I see it in godbolt GCC compiles to: movsx eax, BYTE PTR [rdi+2] cmp al, 9 ja .L42 Clang: movzx edx, byte ptr [rdi + 2] cmp edx, 9 ja .LBB0_40 GCC extend with sign, Clang with zero. cmp with 32 bit register is apparently faster than 8bit As for extension, i

Re: a small C (naive) program faster with clang than with gcc

2023-04-25 Thread Andy via Gcc
I see it in godbolt GCC compiles to: movsx eax, BYTE PTR [rdi+2] cmp al, 9 ja .L42 Clang: movzx edx, byte ptr [rdi + 2] cmp edx, 9 ja .LBB0_40 GCC extend with sign, Clang with zero. cmp with 32 bit register is apparently faster than 8bit pon., 24 kwi 2023 o 17:34 Basile Starynkevitch napisał(a)

a small C (naive) program faster with clang than with gcc

2023-04-24 Thread Basile Starynkevitch
Hello all, Consider the naive program (GPLv3+) to solve the cryptaddition `NEUF` + `DEUX` = `ONZE` onhttps://github.com/bstarynk/misc-basile/blob/master/CryptArithm/neuf%2Bdeux%3Donze/naive0.c (commit0d1bd0e