Re: program compiled with clang from base runs 4 times slower than compiled with gcc-11.2.0p6 from ports

2023-06-06 Thread Chris Cappuccio
Stuart Henderson [stu.li...@spacehopper.org] wrote: > On 2023-06-05, Kastus Shchuka wrote: > > Next I tried -fno-fixup-gadgets, and that made a radical difference: > > Not entirely a surprise, we have seen this a few times now. > Usually it is fine, but has quite bad effects on some programs, >

Re: program compiled with clang from base runs 4 times slower than compiled with gcc-11.2.0p6 from ports

2023-06-05 Thread Stuart Henderson
On 2023-06-05, Kastus Shchuka wrote: > Next I tried -fno-fixup-gadgets, and that made a radical difference: Not entirely a surprise, we have seen this a few times now. Usually it is fine, but has quite bad effects on some programs, however it is quite a nice mitigation (big reduction in the

Re: program compiled with clang from base runs 4 times slower than compiled with gcc-11.2.0p6 from ports

2023-06-04 Thread Kastus Shchuka
On Sun, Jun 04, 2023 at 05:31:34PM -0600, Todd C. Miller wrote: > Take a look at the clang-local man page, it documents the difference > between the OpenBSD base clang and stock llvm. You can try disabling > some of the options to find which one (or combination of options) > is causing the

Re: program compiled with clang from base runs 4 times slower than compiled with gcc-11.2.0p6 from ports

2023-06-04 Thread Todd C . Miller
Take a look at the clang-local man page, it documents the difference between the OpenBSD base clang and stock llvm. You can try disabling some of the options to find which one (or combination of options) is causing the slowdown. I would try building with -fno-stack-protector and -mno-retpoline

program compiled with clang from base runs 4 times slower than compiled with gcc-11.2.0p6 from ports

2023-06-04 Thread Kastus Shchuka
I am puzzled with performance of a C program compiled with clang from base. The program in question is enchive [1] Most of the time I use it on macos or linux, but recently I had to install it on openbsd. I compiled it with default clang from base, and the first thing that struck me was long