[luau] compiler optimization?
Lou Rickard
lou_rickard at yahoo.com
Thu May 15 10:29:00 PDT 2003
A friend of mine reccommended that I play around with
compiler optimizations a bit to see what happens. I
was a little surprised.
I have an application that's about 10k lines of C code
written for linux. It's multi-threaded. It doesn't
do any complicated math. It compiles to about 1.8MB.
Compiled with no optimizations its size is 1870614
bytes.
Compiled with -O2, it has the same size. According to
diff, it's identical to the non-optimized version.
Compiled with -Os, it has the same size, and according
to diff, it's identical to the non-optimized version.
Compiled with -O2 -march=pentium3 -mcpu=pentium3
-funroll-loops, it has the same size, and according to
diff, it's identical to the non-optimized version.
I'm running RH 7.2, with RH's 2.9.6 version of gcc, on
a pentium3.
So, I'm a little confused, it seems like the different
optimizations would have had some impact, even if it
wasn't an improvement. Is it me? Is it the compiler?
Is it the relationship I have with the compiler?
Have I failed to nurture and provide comfort to it in
some way? Where did I go wrong?
Also, what other optimizations would people reccommend
that wouldn't break the portability of the code itself
(ok to take out Makefile/compiler optimizations, not
ok to write processor specific code)?
L.R.
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
More information about the LUAU
mailing list