Erik de Castro Lopo
2014-Nov-30 18:40 UTC
[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS
Jan Stary wrote:> Yes, that's for DEBUG. > But why does it strip -O2 and add -O3 with NDEBUG?Well thats something from before I took over as FLAC maintainer. My understanding is that '-O3 -funroll-loops' gives the next encoder and/or decoder performance. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Christian Weisgerber
2014-Nov-30 20:28 UTC
[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS
On 2014-11-30, Erik de Castro Lopo <mle+la at mega-nerd.com> wrote:> My understanding is that '-O3 -funroll-loops' gives the next encoder > and/or decoder performance.Or it triggers compiler bugs and -funroll-loops makes the code slower because it overflows the instruction cache. -- Christian "naddy" Weisgerber naddy at mips.inka.de
Jan Stary
2014-Nov-30 21:45 UTC
[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS
On Nov 30 10:40:46, mle+la at mega-nerd.com wrote:> Jan Stary wrote: > > > Yes, that's for DEBUG. > > But why does it strip -O2 and add -O3 with NDEBUG? > > Well thats something from before I took over as FLAC maintainer. > > My understanding is that '-O3 -funroll-loops' gives the next encoder > and/or decoder performance.Yes, they are optimization switches. But what are they doing in a NDEBUG setup? It's none of NDEBUG's businnes to be adding these, right?
lvqcl
2014-Nov-30 22:01 UTC
[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS
Christian Weisgerber wrote:>> My understanding is that '-O3 -funroll-loops' gives the next encoder >> and/or decoder performance. > > Or it triggers compiler bugs and -funroll-loops makes the code > slower because it overflows the instruction cache.FLAC has its own test suite and AFAIK it passes all the tests. And -O3 implies -ftree-vectorize which can speed up en-/decoding.
Erik de Castro Lopo
2014-Dec-01 08:33 UTC
[flac-dev] [PATCH] configure.ac: don't try to unset -g from CFLAGS
Jan Stary wrote:> Yes, they are optimization switches. > But what are they doing in a NDEBUG setup? > It's none of NDEBUG's businnes to be adding these, right?NDEBUG means "no debug". Turning on optimisations when debug is disabled makes sense to me. What's the problem? Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/