Subject: bug#23474: closed (Re: bug#23474: Gzip and CFLAGS)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 07 May 2016 02:53:02 +0000

Your bug report

#23474: Gzip and CFLAGS

which was filed against the gzip package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
23474: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23474
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#23474: Gzip and CFLAGS
From: Paul Eggert <[email-masked]>
To: Tom Smith <[email-masked]>, [email-masked]
Date: Fri, 6 May 2016 19:52:26 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Tom Smith wrote:

>             Currently, I am looking at “CFLAGS= -O”.

You don't mention which gzip version. If you haven't already, please try the
current version, gzip 1.8. Its 'configure' script should default to -O2
optimization for GCC, and to no optimization for other compilers. To some extent
this is arbitrary. Tweaking this further is up to you. For example,
-march=native is better for some usages but not for others, which is why it is
not the default.

Subject: Gzip and CFLAGS
From: Tom Smith <[email-masked]>
To: [email-masked]
Date: Fri, 6 May 2016 21:15:15 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello there,

            After having compiled gzip, I had looked at the Makefile
“./configure” generated.

            Looking at CFLAGS=”” (system configuration section), not many
compiler flags are specified for optimization.

            The “Specific Targets” section sets different flags for
different systems, which are set accordingly.

            Currently, I am looking at “CFLAGS= -O”.

            I noticed that some optimization flags were not set (curious as
to why):

-         -march=native (pentium3, athlon64, etc) (produces code for the
specific architecture specified)

-         -O2 (recommended level to use to increase code performance )

-         -pipe (makes compilation process faster)

-         -fomit-frame-pointer (reduces generated code size)

Also, I found this article
http://lists.gnu.org/archive/html/bug-gzip/2013-02/msg00000.html and it
mentions setting –O2 and encountering an issue (it has since been fixed).

After running some tests after I recompiled (Linux), sometimes I noticed it
to be a little bit faster (at times) on x86_64.

Note: There are many different conditions that cause the numbers to
fluctuate, such as: # of processes running, ram usage, CPU power etc.

Thank You