OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => OpenZaurus/Opie/Qtopia => Topic started by: ShiroiKuma on March 27, 2007, 02:04:42 pm

Title: Gcc -o4 Flag
Post by: ShiroiKuma on March 27, 2007, 02:04:42 pm
I'm playing around with optimizing compiled packages to run fine on Ångström, but the question isn't really Ångström-specific.

I've seen on Meanie's blog on building Firefox natively (http://www.tyrannozaurus.com/?q=node/478) that he used the -O4 option in CFLAGS.

I've looked but not found anything substantive on this flag. One Finnish page on the web states that if -On has n higher than 3, then the flag is automatically interpreted as -O3. Is this so? Or is there a difference between these?
Title: Gcc -o4 Flag
Post by: speculatrix on March 27, 2007, 05:18:51 pm
that's using the Spinal Tap version of the compiler - everyone else's goes up to O3, but the 'tap' version goes up to O4.


---

I wonder whether anyone will understand this joke?
Title: Gcc -o4 Flag
Post by: adf on March 27, 2007, 07:16:00 pm
Quote
that's using the Spinal Tap version of the compiler - everyone else's goes up to O3, but the 'tap' version goes up to O4.


---

I wonder whether anyone will understand this joke?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157320\"][{POST_SNAPBACK}][/a][/div]
11
Title: Gcc -o4 Flag
Post by: Meanie on March 28, 2007, 03:42:09 am
Quote
Quote
that's using the Spinal Tap version of the compiler - everyone else's goes up to O3, but the 'tap' version goes up to O4.


---

I wonder whether anyone will understand this joke?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157320\"][{POST_SNAPBACK}][/a][/div]
11
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157335\"][{POST_SNAPBACK}][/a][/div]

oh man, these geek jokes are way over my head. can someone explain it so some dummy like me can understand it?
Title: Gcc -o4 Flag
Post by: speculatrix on March 28, 2007, 06:17:39 am
If you haven't seen the film "Spinal Tap", the joke won't make any sense.
Title: Gcc -o4 Flag
Post by: ShiroiKuma on March 28, 2007, 08:58:00 am
Quote
If you haven't seen the film "Spinal Tap", the joke won't make any sense.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157383\"][{POST_SNAPBACK}][/a][/div]
Didn't get the joke either...

How about the original issue though, is there really an -O4 flag that furthers optimization, or is it just the same as -O3?
Title: Gcc -o4 Flag
Post by: koen on March 28, 2007, 09:00:27 am
Quote
Quote
If you haven't seen the film "Spinal Tap", the joke won't make any sense.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157383\"][{POST_SNAPBACK}][/a][/div]
Didn't get the joke either...

How about the original issue though, is there really an -O4 flag that furthers optimization, or is it just the same as -O3?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157402\"][{POST_SNAPBACK}][/a][/div]

Just keep in mind that you're reading from *slow* media into a tiny amount of RAM, so 'optimized' binaries will execute slower in the end. I heard the people at nokia use -Os for certain applications because execution time is IO-limited.
Title: Gcc -o4 Flag
Post by: ZDevil on April 01, 2007, 03:04:25 am
Well then, i have another curiosity question: how would a Firefox build with -O2 optimization (which seems to be very common for compiling Z apps) compared with the one with -O4?
When do we use which level of optimization?
And how do we know?  :?
Title: Gcc -o4 Flag
Post by: Da_Blitz on April 01, 2007, 04:11:57 am
just stick with -O2, -O3 or higer dont always produce faster binaries and somtimes will not compile (as i have found out)

if you really need spped -O640K should be good enough for anyone
Title: Gcc -o4 Flag
Post by: ShiroiKuma on April 01, 2007, 01:44:49 pm
Quote
if you really need spped -O640K should be good enough for anyone
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157719\"][{POST_SNAPBACK}][/a][/div]
What does this one do? And how does it compare in terms of speed, subjectively what you feel when using the compiled app, with -O2 or -O3 ?
Title: Gcc -o4 Flag
Post by: adf on April 01, 2007, 02:14:32 pm
Quote
Quote
if you really need spped -O640K should be good enough for anyone
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157719\"][{POST_SNAPBACK}][/a][/div]
What does this one do? And how does it compare in terms of speed, subjectively what you feel when using the compiled app, with -O2 or -O3 ?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157751\"][{POST_SNAPBACK}][/a][/div]
Wasn't that MS humor?