7

Is Xcode (Using Xcode 4.2) optimized for a quad core processor? My real question is will Xcode's performance be noticeably different with a dual core i7 as opposed to a quad core i7?

I might be purchasing a new computer soon, and want to know if it would be worth it to go with the quad core 15" instead of the dual core 13". I'm not really worried about screen size.

Thanks!

2 Answers 2

9

Xcode will make good use of many cores - especially when running the simulator, unit testing at build time and just coding / compiling / searching documentation.

Also check to see if the processor with more cores has a higher speed boost when only one core is running. The rated speeds are controlled more by thermal conditions under full or benchmark loads and can run faster when the current workload is single thread dominated.


In general, the IO is the first thing to slow down a developer doing multiple normal dev tasks. Next is insufficient RAM and a distant third underpowered CPU. Do take your Xcode installer and some sample projects into an apple store and ask if you could run some tests on an air as well as larger machines. Some specific code bases and settings might be more polarized than the general case and more biased to CPU with larger cache or speeds, but the smallest air is so much faster than my three year old 15 MBP it's not very funny at all.

6
  • Alright, thanks! As I am not a hardware guy, I am a little in the dark about these things. I understand that GHz is partially a reflection of the speed of the processor- which would be faster for code compiling/simulation/testing- the 2.8GHz dual-core or the 2.2GHz quad-core? Or is there a noticeable difference? Commented Nov 24, 2011 at 0:50
  • 6
    I would get the SSD you can afford first. Even an air with SSD will be more productive / fast than an iMac with a spinning drive. Put large files elsewhere (second drive) as needed and only worry about CPU as the last item. It depends more on the code - but again the IO is what kills your productivity rather than CPU. Take a sample project and run it on any Air to see how fast those are. Most stores don't have SSD on display for other models, but spend your money on that first would be my advice.
    – bmike
    Commented Nov 24, 2011 at 1:34
  • Well first off it's going to be a laptop, though I'm not sure that makes much of a difference. And wow- really the SSD is the most important? I had thought that was more of a convenience thing. 8GB of RAM would still take precedence over the SSD though, right? Commented Nov 24, 2011 at 1:53
  • 2
    Nope - SSD is the most important thing - and RAM can be added easily on any non-Air and often gets less expensive. I always compare what RamJet costs vs Apple RAM - both are premium service / low hassle vendors. You can see if you want to wait and go with the base RAM or splurge for factory RAM on the get-go. Waiting till you actually have RAM constraint means costs may have gone down while you lived off the base configuration. Yes, you can add SSD later too, but those can be crankier with sleep issues, temp sensor problems, etc...
    – bmike
    Commented Nov 24, 2011 at 5:02
  • Wow- that totally changed my perspective on this. Will the upgraded RAM and processor not increase compiling time noticeably? That is the only problem I have with the computer I have right now; it is the reason I am upgrading. Commented Nov 24, 2011 at 5:04
1

It might have been the case for objective C in the days long gone but Xcode 8.0 does NOT make use of all the cores (at least when compiling swift).

A note to explain:

  1. get xcode 8.0
  2. run activity monitor open on CPU tab watch the idle times during swift compile phase. THEN do be sure to downvote (once you see no significant idle). An i7 based mac is a bonus.

UPD: It's broken in a peculiar way. At the beginning it fires off 4-5 swift compilers to match the number of physical cores but later on it runs 1(ONE!) swift compiler at a time leading to massive CPU underutilization.

Maybe the swift frontend can not figure out the dependencies for a parallel build.

Note, I'm not saying: do not buy a 4 core machine! do not migrate to swift! But activity monitor setup to update every single second on an i5 and i7 powered macs shows only single swift compiler in flight. It's slowly becoming a moot point as the swift potentially compiles faster than objc and there is less code to compile.

UPD20161104: note how archiving (presumably written by the old school nextstep engineers) contrasts with this newfangled opensource junk: it utilizes just a little over 3 cores leaving 1 to have a (very) responsive system. Perfect.

Contrast that perf with uploading archive to itunes connect is at a whopping 5-7 KBps (and that is over 50Mbps fiber optic link) I wonder where's the bottleneck on the other end.

2
  • Sounds like a bug and not an architectural change. I'm not seeing it but I don't run on i7 right now. Great details +1 and thanks for updating the thread. The parts of this that will always be excellent is how to set up a test and why to measure specific items. +10 if I could vote several times.
    – bmike
    Commented Oct 27, 2016 at 10:37
  • Good point Anton. We’re just out of a second phase where MacBook 2015 had NVMe storage and nothing else did, so some code related benchmarks there made up for lack of CPU and others didn’t. Now that the MBP have NVMe SSD they do benchmark far better across the board. Six years from your post here, I wonder if iPad or iPhone or another hardware will be the discussion on what device to run?
    – bmike
    Commented Jul 6, 2017 at 9:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .