Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4095040
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:50:04+00:00 2026-05-20T19:50:04+00:00

I run on Ubuntu 10.10. man g++ talks about -O1, -O2, -O3 optimization options

  • 0

I run on Ubuntu 10.10.

man g++ talks about -O1, -O2, -O3 optimization options

I noticed that -O5 works also, as well as -O1000…

I used “g++ -v -O5 toto.cpp”, but it is not clear to me what’s the difference. What does -O5 do actually ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T19:50:05+00:00Added an answer on May 20, 2026 at 7:50 pm

    -O5 currently does the same as -O3, as does -O1000. Optimization level 3 is currently the max, but the -O flag accepts a higher level anyway for forward compatibility. Proof:

    $ g++ -O2 -Q --help=optimizers > O2
    $ g++ -O3 -Q --help=optimizers > O3
    $ g++ -O5 -Q --help=optimizers > O5
    $ g++ -O1000 -Q --help=optimizers > O1000
    $ diff O2 O3
    [ ... lots of output]
    $ diff O3 O5
    $ diff O3 O1000
    $
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run an installation of Ubuntu as a server. I have noticed that it
I'm trying to run my php App from Ubuntu Server 11.10. This App works
I am trying to create an application that would run on ubuntu desktops,I want
I'd like to write a script that once run on Ubuntu, captures any mouse
I have two ruby script cron jobs that I'm trying to run under Ubuntu
I am working on a project that requires me to run Ubuntu as a
I have a custom server in C# being run on Ubuntu 11.10 under mono.
I run PHP 5.2 on Ubuntu with Apache 2. When I want to serve
I've run the following command in the Ubuntu terminal - sudo apt-get install mono-develop
I'm attempting to run the following command in PHP (on Ubuntu): <?php if (exec(/home/johnboy/ffmpeg/ffmpeg

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.