Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Why when compiling C++ code uses a maximum of 30% of the CPU?

Why when compiling C++ code uses a maximum of 30% of the CPU? In Incredibuild writes that use 1 core of the 4 available. i5 2300

Product Version: Not Selected
more ▼

asked Jan 26 '18 at 11:53 PM in C++ Programming

avatar image

122 10 20 33

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Multithereding in compilation means running multiple compilers at once and each compiles different cpp file, linking most likely will use single core. UBT shows in output log maximum nuber of compilers (thread) it gonna run, but you need enough cpp files to compile to fill them in.

If your project has unity enabled (cpp batching) then it will compile only one cpp file which effectivly will use only single core, you can disable unity in module by setting bFasterWithoutUnity to true in module build script (*.build.cs), if you have a lot of cpp files then unity feature will create few cpp files and it will use more cores in process and will be faster.

Note that at the end OS is the one that decides which process and process thread use which core and CPU thread, process can suggest which to use but i don't think compiler does that

more ▼

answered Jan 27 '18 at 03:30 AM

avatar image

35.2k 921 166 1098

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question