GNU bug report logs -
#23474
Gzip and CFLAGS
Previous Next
Reported by: Tom Smith <gnuacc2016 <at> gmail.com>
Date: Sat, 7 May 2016 02:44:01 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 6 May 2016 19:52:26 -0700
with message-id <572D586A.6050309 <at> cs.ucla.edu>
and subject line Re: bug#23474: Gzip and CFLAGS
has caused the debbugs.gnu.org bug report #23474,
regarding Gzip and CFLAGS
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
23474: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23474
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
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
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
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.
This bug report was last modified 9 years and 12 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.