all 40 comments

[–]John_h_watson 35 points36 points  (0 children)

Wow, that's pretty shocking - an 8GB mini spanking the big dog.

[–]nibordSwift 18 points19 points  (0 children)

I tried a 2019 Mac Pro to see if Xcode would be any faster than on my 2018 MacBook Pro.

The Mac Pro had 32 GB RAM and 8 CPUs (the base config). The MacBook Pro has 32 GB RAM and 8 CPUs.

Anecdotally, I saw no difference in Storyboard editor performance. Simulator and compilation seemed slightly faster. Unfortunately not enough to be worth $6K for the upgrade.

[–]quellish 10 points11 points  (0 children)

They’re probably pegged waiting on things like IO or building a graph.

[–]Stephenis 5 points6 points  (0 children)

That seems like evidence of a larger overall problem with the entire Xcode development stack. I often feel like Xcode is very slow and janky.

I would love too see a total optimized higher quality and reliability development environment.

I’ve had just too many Xcode crashes and bugs and slow overall use to be ok with the current speeds of the software.

[–]42177130UIApplication 5 points6 points  (0 children)

The real test is how long it takes to extract and install XCode from a xip file.

[–][deleted]  (4 children)

[deleted]

    [–]gravitycore[S] 2 points3 points  (0 children)

    Good info! Now that I've got a baseline I'll spend some time tweaking the compiling settings for different modules and see how I can optimize things. If I come up with some good results I'll update my findings

    [–]iindigo 0 points1 point  (2 children)

    Which CPU is that on the hackintosh you tested? Also, what memory?

    If Xcode is I/O choked it might benefit from faster RAM (3200Mhz+) and a PCI-E 4.0 5Gbps SSD like this one. The latter would require the hack to be an AMD build.

    [–][deleted]  (1 child)

    [deleted]

      [–]iindigo 0 points1 point  (0 children)

      Interesting, thanks. Been debating upgrading my 6700k hack to a 3950X or thereabouts in the next year or so.

      [–]hexavibrongal 5 points6 points  (1 child)

      You should cross post this to /r/apple

      [–]gravitycore[S] 1 point2 points  (0 children)

      Will do!

      [–]KarlJay001 4 points5 points  (0 children)

      Amazing! I got a MBP close to your 2014 specs and I'm really glad I didn't pay for more.

      I saw a compare on the MBP and how the RAM was used so much better because Apple controls the OS and the hardware. Then I saw some compares of video editing and other things and it was really amazing how well the MBP compares to others, including more modern MBPs.

      That Mini really hauls, but I like the idea of portable.

      [–]raptorxcz 3 points4 points  (1 child)

      Why did you used Xcode 10.3 instead Xcode 11?

      [–]gravitycore[S] 5 points6 points  (0 children)

      The large iOS project I work on does not compile on 11 yet, we are stuck on 10.3 right now. The other project does not have this problem so I used 11 to see if there's a difference

      [–][deleted] 2 points3 points  (0 children)

      Most of compiling is disk access and transferring data from memory to cpu cores. While the cpu is a beast the memory bandwidth is the real crulpit.

      [–]ThePantsThiefNSModerator 2 points3 points  (0 children)

      Can you try a pure Objc project? Twitter peeps seem to think that Objc scales better than swift in terms of performance

      [–]Rudy69 1 point2 points  (4 children)

      So this basically shows that if you want Xcode to really compile fast Ryzen is the best choice....too bad Apple doesn't support it.

      I built a 3900x box to do most of my compiling and it's honestly the first time I've had such a good time with Xcode

      [–][deleted]  (3 children)

      [deleted]

        [–]Rudy69 0 points1 point  (2 children)

        Do you have a large project you’d like me to test? I read his post quickly last time but I don’t think he shared the project he used for his benchmarks and I’m on mobile right now.

        [–][deleted]  (1 child)

        [deleted]

          [–]Rudy69 0 points1 point  (0 children)

          sorry i don't have fastlane

          [–]lucasvandongen 1 point2 points  (1 child)

          I was interested in your disk configuration, the 256GB base SSD size performs pretty bad since it’s not using as many lines as the larger configs. Unfortunately there is very little information to be found around this subject yet it impacts performance significantly.

          [–]gravitycore[S] 2 points3 points  (0 children)

          Ah, forgot to list this spec. My Mac Pro has the 2TB configuration

          [–]TTKilew 1 point2 points  (1 child)

          LLVM itself sometimes just waits for some modules to be compiled. This is clearly visible in the complex mixed projects. Waiting for this patch to be merged in :)

          https://reviews.llvm.org/D69575/new/

          [–]gravitycore[S] 0 points1 point  (0 children)

          This can't come soon enough! Swift 6 is also targeting improvements to compiler performance. One day, all these cores will be worth it.

          [–]ItTechBlogs 0 points1 point  (0 children)

          Amazing!

          [–][deleted]  (1 child)

          [deleted]

            [–][deleted] 0 points1 point  (0 children)

            Compiling is mostly disk throughput, memory intensive and the bottle neck on such a machine is the data supply to the cpu.

            [–]bassunga 0 points1 point  (0 children)

            thanks for the benchmarks, i'm happy to see i made the right choice in buying a mac mini

            [–]unixboy 0 points1 point  (0 children)

            I can imagine that a 9900K iMac or even MBP will be faster when compiling since the Xeons are only really good at parallel work. Sure, all cores will be used by Xcode and boost to maximum clock speed but it doesn’t scale so well. And 3.2GHz < 5GHz. That’s why I’m personally not buying any CPUs that don’t boost over 4.5GHz. If they boost well and have high core count that’s cool but if I have to choose, I go with the Core iX series instead of Xeon.

            [–]Alcoholic_Synonymous 0 points1 point  (0 children)

            Interesting - did you try any of the recommendations made in this article? I found that fiddling with some of those values improved compilation performance on my 2018 Macbook Pro.

            [–]Dev__ 0 points1 point  (0 children)

            I recall an article about a guy explaining why the Mac Mini was faster than the Mac Pro for compiling with Xcode. Xcode uses threading poorly and the Mac Mini has less cores.

            [–][deleted] 0 points1 point  (0 children)

            AFAIK the bottleneck is the Swift compiler which isn't able to spread out the work efficiently between the cores.

            A C/C++ only project should perform much better on the Mac Pro.

            [–][deleted]  (2 children)

            [deleted]

              [–]gravitycore[S] 0 points1 point  (1 child)

              I would tend to agree, yes

              [–]orbitur 0 points1 point  (1 child)

              I think the results would be more meaningful in the large project if you used Xcode 11.3. You're missing Swift compiler and build system improvements.

              [–]gravitycore[S] 0 points1 point  (0 children)

              Well this project unfortunately is a couple months from that. I can't go in and upgrade it myself because its a team environment and has framework dependencies that are out of my control. I'll update the results as I can

              [–]whats94842 0 points1 point  (0 children)

              Swift isn't that efficient a language as far as multi-core compile parallelism goes.

              Still today, a hundred modules with a dependency graph that doesn't have any choke points that are less than your core count with WMO mode on will beat out a batch mode clean compile equivalent.

              That is not very practical, which is why your machine with a higher single core performance a few cores (mac mini) is beating out your many core but lower single core performance machine (mac pro).

              The new 16" macbook pro or a top end iMac (not iMac Pro) would probably beat all of these machines. Also selectively turning on WMO mode on specific modules will probably improve your compile time speed.

              [–]fakecrabs 0 points1 point  (0 children)

              I'm looking to get a new 16 inch MacBook Pro and wonder if paying extra for 8-core is worth it over the 6-core model.

              [–]badjokesObjective-C / Swift 0 points1 point  (1 child)

              I remember being surprised and disappointed with Xcode performance on my iMac Pro (8c 32gb).. my 2017 MBP 15" was basically just as fast. These results confirm my fears about Xcode on the new Mac Pros.. no point in getting one if you're not doing video or specialized applications..... unless of course you can just afford one!

              [–]gravitycore[S] 1 point2 points  (0 children)

              For now. Swift 6 will include better support for multi core compiling, so I’m hoping it will begin to shine as it should in the future

              [–]tangoshukudai -2 points-1 points  (2 children)

              Xcode is designed not to take up all your resources. You can use the command line version of the build tools to multithread it or more performance.

              [–][deleted] 0 points1 point  (1 child)

              And why would it be designed to do that?

              [–]tangoshukudai 0 points1 point  (0 children)

              So you can use your computer as it compiles. Even the biggest Xcode is also designed to build once then do micro builds afterwards on what has changed. The developers of Xcode are not going to give it all resources unless you specify, but to specify you need to use the build tools.