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 8224969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:15:16+00:00 2026-06-07T15:15:16+00:00

Trivial programs are taking around 2 seconds to compile every time I run g++

  • 0

Trivial programs are taking around 2 seconds to compile every time I run g++ in Terminal on my new MBP. Whereas when I ssh into my school’s network they compile almost instantly. Same thing with my old macbook. Why is this one, with a brand new OS and lots of processing power, taking forever to compile.

Could this be because of where my compiler has been stored from when I downloaded g++ from Apple’s website? Or, if that is out of the question, is there any other reason why this would happen? If so, how do I fix it? I’ve googled and found nothing.

  • 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-06-07T15:15:18+00:00Added an answer on June 7, 2026 at 3:15 pm

    No, it doesn’t take 2 to 5 second to compile. Especially on MBP, unless it is like 10 years old maybe. I have Air (OS X 10.7.4, LLVM G++ 4.2, 1.8 GHz Intel Core i7) and it takes roughly half a second:

    $ uname -a
    Darwin air 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr  9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64 
    $ echo 'int main() { return 0; }' > ./test.cpp
    $ time g++ -o test ./test.cpp 
    
    real    0m0.561s
    user    0m0.021s
    sys 0m0.411s
    

    You either measure time incorrectly or have something else that is screwing things up for you a big time, in which case you have to see what’s going on in the system (i.e. using a profiler).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I attempt to compile the output of this trivial lex program: # lex.l
I'm fairly new to xcode so I apologize if this question is trivial. I'm
This might be a really trivial question, but I've been writing Java programs at
I'm relatively new to scala and made some really simple programs succesfully. However, now
Question What would be a good (ideally, technical) reason to ever program some non-trivial
Rather Trivial Question. So I tried to do this: if (array[0]==some_string) where array is
This is just a trivial question of what convention you suggest. Recently, I have
I have trivial window: this.window = Ext.widget('window', { title: 'Find', closeAction: 'hide', width: 300,
This should be a trivial question. But I am confused. I want to print
Probably a very trivial problem. I have an object that looks like this: @PersistenceCapable

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.