Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] CentOS to Gentoo-Pros/Cons(if any)?



>>>>> "mudrii" == mudrii  <mudrii@example.com> writes:

    mudrii> -Os not work on amd64 yet

Pity.  I don't know if this is a GCC 3.x-ism, but it used to be the
case that you needed an -O in there to get inlining at all (which is
of course an important optimization in the case of one-line
functions).  So you can do pretty well with -O0.

>>>>> Josh Glover wrote:

    >> /me hangs his head in shame

Yer borderline me hearty!  What gets me is not that somebody generally
clueful doesn't know the right incantation, but the fact that this
isn't the first thing taught to every hacker these days.  With the
typical piece of code bunging through something like 6 "caches" before
it hits the processor, and cache misses dominating performance, size
and locality are about all you can aim for, in general program
optimization.  Of course if you're looking at a known hot spot,
optimizing for speed makes a big difference.  But how often do you see

# hot spot, crank up the -O level
innerloop.o:  innerloop.c
	$(CC) -O42 -o innerloop.o -c innerloop.c

Professor Knuth sez, "premature optimization is the root of all
error."  :-)

-- 
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links