News for hackers. Stuff that matters.
Re:Bubble sort slower with -O3 than -O2 with GCC by gnufx on Sunday October 17, 2021 @02:29PM (#28898583)
I see something rather different with that example, using GCC 10 on SKX with that code and program argument, bound to a core, +/- ~2%:

-O2 -g: 1.07s

-O3 -g: 1.17s

-O3 -g -fprofile-generate/use: 0.84s

(maqao cqa from https://maqao.org would give comprehensive info on the generated code.)

--

   /* Tom, don't let me ever catch you using bubblesort again! -- Don */
— Knuth in dvips/afm2tfm.c
Re:Bubble sort slower with -O3 than -O2 with GCC by Ballas on Tuesday October 19, 2021 @02:21AM (#28915355)
Are you also on Ryzen? I get:

clang -O3 -march=native: 0.769s

clang -O3 : 0.830s

clang -O2 -march=native : 0.904s

gcc -O2 -march=native :1.007s

gcc -Os -march=native : 1.148s

gcc -O3 -march=native : 1.928s

gcc (GCC) 11.1.0

clang version 12.0.1

On Ryzen 3700x