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 <bas...@starynkevitch.net> napisaĆ(a): > > 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 > <https://github.com/bstarynk/misc-basile/commit/0d1bd0ea8e2708036fcf126cc1f096be888360ab>) > > > On Linux/x86-64 that source code compiled with gcc-12 -O3 is twice as > slower as with clang -O3 > > (Debian/Sid or Ubuntu/22/10) > > Feel free to add it to some testsuite! > > > Thanks > > > -- > Basile Starynkevitch<bas...@starynkevitch.net> > (only mine opinions / les opinions sont miennes uniquement) > 92340 Bourg-la-Reine, France > web page: starynkevitch.net/Basile/ & refpersys.org