Results 1 to 8 of 8

Thread: Dual-core GCC support?

  1. #1
    Join Date
    Apr 2008
    Location
    /dev/null
    Beans
    83
    Distro
    Ubuntu 8.04 Hardy Heron

    Dual-core GCC support?

    Does GCC support dual-core processors in any way? If so, how?
    Living with a crappy computer ain't fun...

  2. #2
    Join Date
    Oct 2007
    Beans
    178

    Thumbs down Re: Dual-core GCC support?

    Code:
    make -j N
    where N is number of cores plus one.

  3. #3
    Join Date
    Apr 2008
    Location
    /dev/null
    Beans
    83
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Dual-core GCC support?

    Cool.
    Living with a crappy computer ain't fun...

  4. #4
    Join Date
    Jan 2007
    Beans
    1,010
    Distro
    Kubuntu Development Release

    Re: Dual-core GCC support?

    Quote Originally Posted by fsmithred View Post
    Code:
    make -j N
    where N is number of cores plus one.
    Hm... what is the reasoning behind that?

    -j [jobs], --jobs[=jobs]
    Specifies the number of jobs (commands) to run simultaneously. If there is more than one -j
    option, the last one is effective. If the -j option is given without an argument, make will
    not limit the number of jobs that can run simultaneously.
    my shiz: http://inportb.com/
    use Dropbox if you need an awesome free file hosting service; please follow my referral link for an extra 256MB of free storage.

  5. #5
    Join Date
    Oct 2007
    Beans
    178

    Re: Dual-core GCC support?

    It speeds up compiling by keeping both cores busy. (assuming dual core)

    Here are some benchmarks -
    http://techgage.com/article/intel_co...9450_266ghz/11

  6. #6
    Join Date
    Aug 2007
    Location
    Manchester, UK
    Beans
    10,285
    Distro
    Ubuntu

    Re: Dual-core GCC support?

    So for dual core processors I assume you would run something like
    Code:
    make -j 3
    
    OR
    
    gcc some-random-long-c-file.c -j 3 -o this-is-my-app

  7. #7
    Join Date
    Oct 2007
    Beans
    178

    Re: Dual-core GCC support?

    Quote Originally Posted by Joeb454 View Post
    So for dual core processors I assume you would run something like
    Code:
    make -j 3
    
    OR
    
    gcc some-random-long-c-file.c -j 3 -o this-is-my-app

    Yeah 'make -j3' is right for dual core. I have no idea what the other line says.

  8. #8
    Join Date
    Dec 2006
    Beans
    7,304

    Re: Dual-core GCC support?

    Hi,

    I believe that the idea of 'processor number + 1' is a little flawed for jobs number. A uniprocessor can also run multiple processes and can benefit from the --jobs=n option.

    An interesting discussion of this:

    http://oreilly.com/catalog/make3/book/ch10.pdf

    Andrew
    You think that's air you're breathing now?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •