[NBLUG/talk] /etc/make.conf issues and a desire to strangle nVidia

Chris Palmer chris at eff.org
Mon Jan 30 10:59:00 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stephen Cilley wrote:

> First, I just installed Gentoo this weekend and after I got
> everything set up that I needed I went to go and add something to my
> USE variable and found that my /etc/make.conf had been totally
> useless during all of those emerge commands. For whatever reason it
> had replaced all of the newline characters I had typed with "^M" so
> that the entire file had been commented out and I guess it was
> running make on defaults. For whatever reason make never once bitched
> at me. My question is this: I don't mind recompiling most of that
> stuff, but does it make a difference (the stuff in the make.conf)? I
> mean, my kernel, yeah, and any of the other small utilities, but re
> emerge ing xorg and kde is going to be painful... again.

I would be amazed if different "optimization" options for GCC resulted
in the performance of a given application improving from unacceptable to
acceptable. I would also be amazed if the performance difference was
even noticeable.

GCC is not generally thought of as a high-performance compiler. It
generates slow code slowly. Furthermore, some of those "optimization"
options might introduce bugs into the generated code.

If your application really is too slow to be useful, the first thing to
do is to profile it. That way you can find the parts of the program that
are heavily used and under-optimized. Then you can try to improve the
algorithms and data structures used in those parts of the program. For
example, you might tune the parameters of a hash table data structure,
or replace a linear search of a list with a binary search. That's the
best bang-for-buck way of improving performance.

After that, you can try crazy hacks, inline assembly, and maybe compiler
options. If you get to this point, you'd probably notice the biggest
difference by switching from GCC to (e.g.) the Intel compiler.

Tweaking and poking without first measuring real performance against
some objectively determined minimum is just a waste of time. Rather than
learn all the command line options to GCC, learn C! It will pay off.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD3mH0sobNj2jkCc0RAvqzAJ4k/i3ehoDarcckxmSKHS7R8/U6vACeMcV8
+0sA/+Sp4cE67yEWfnHeFYc=
=Wee8
-----END PGP SIGNATURE-----



More information about the talk mailing list