Re: [PATCH] Make gcc -align options .config-settable

From: Grzegorz Kulewski
Date: Fri Oct 08 2004 - 16:31:45 EST


On Fri, 8 Oct 2004, Denis Vlasenko wrote:

On Friday 08 October 2004 17:30, Grzegorz Kulewski wrote:
Also bencmarking people may do little research on real usefulness of
various kinds of alignment.

I think that removing aligns completly will be very bad. I am Gentoo user
and I set my user space CFLAGS for all system to -falign-loops
-fno-align-<everything else>. I did not tested it in depth, but my simple
tests show that unaligning loops is a very bad idea. Unaligning functions

That depends on how often that loop runs. 90% of code runs only
10% of time. I think ultimately we want to mark other 10% of code with:

Well, loops should probably always be aligned because aligning them will not make the code significantly larger (I think, I did not mensure it), but it will make the code significantly faster, and more friendly to
processor's cache.


is safer since small and fast functions should be always inlined.

Concept of alignment does not apply to inlined functions at all.

That is my point. It is safe not to align functions because fast and often called ones will be inlined and will not be slowed down by lack of alignment.


Thanks,

Grzegorz Kulewski

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/