Author Topic: Gcc -o4 Flag  (Read 11870 times)

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Gcc -o4 Flag
« 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 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?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Gcc -o4 Flag
« Reply #1 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?
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Gcc -o4 Flag
« Reply #2 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
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Gcc -o4 Flag
« Reply #3 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?
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Gcc -o4 Flag
« Reply #4 on: March 28, 2007, 06:17:39 am »
If you haven't seen the film "Spinal Tap", the joke won't make any sense.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Gcc -o4 Flag
« Reply #5 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?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Gcc -o4 Flag
« Reply #6 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.
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Gcc -o4 Flag
« Reply #7 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?  :?
« Last Edit: April 01, 2007, 03:05:57 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Gcc -o4 Flag
« Reply #8 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
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Gcc -o4 Flag
« Reply #9 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 ?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Gcc -o4 Flag
« Reply #10 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?
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf