Skip to content

Instantly share code, notes, and snippets.

@hartbit
Last active February 7, 2020 10:19
Show Gist options
  • Save hartbit/08ee9fe241a0f727c63563e441686ee2 to your computer and use it in GitHub Desktop.
Save hartbit/08ee9fe241a0f727c63563e441686ee2 to your computer and use it in GitHub Desktop.
tmp=`mktemp -d -t swiftpm`
git clone --quiet https://github.com/apple/swift-package-manager $tmp > /dev/null
swift package --package-path $tmp resolve > /dev/null
time swift test --package-path $tmp --parallel
system_profiler SPHardwareDataType
swift --version
@radianttap
Copy link

Thank you for this test, this is very cool to test out my assumptions that AMD-based Macs will be much more performant per price versus Intel based. I've built one for myself and comparison with my ageing MacBook Pro 2016 is telling.

@radianttap
Copy link

radianttap commented Feb 5, 2020

Ran on Catalina 10.15.3

swift test --package-path $tmp --parallel  
587.67s user 
218.72s system 
775% cpu 
1:44.04 total

Hardware Overview:
      Model Name: hMac
      Processor Name: 6-Core AMD Ryzen 5 3600
      Processor Speed: 3,6 GHz
      Number of Processors: 1
      Total Number of Cores: 6
      L2 Cache (per Core): 512 KB
      L3 Cache: 32 MB
      Hyper-Threading Technology: Enabled
      Memory: 16 GB

Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin19.3.0

@radianttap
Copy link

Ran on Mojave 10.14.6, not sure why is the output for swift test different (I have Xcode 11.3.1 on both machines).

swift test --package-path $tmp --parallel
real	3m31.613s
user	14m45.390s
sys	4m26.075s

Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro13,3
      Processor Name: Intel Core i7 (4-core)
      Processor Speed: 2,7 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 8 MB
      Hyper-Threading Technology: Enabled
      Memory: 16 GB

Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin18.7.0

@jmcd
Copy link

jmcd commented Feb 5, 2020

Not sure if you're interested in laptops, but anyway

real	2m2.805s
user	11m27.551s
sys	4m17.242s
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro16,1
      Processor Name: 8-Core Intel Core i9
      Processor Speed: 2.4 GHz
      Number of Processors: 1
      Total Number of Cores: 8
      L2 Cache (per Core): 256 KB
      L3 Cache: 16 MB
      Hyper-Threading Technology: Enabled
      Memory: 32 GB

Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin19.3.0

@hartbit
Copy link
Author

hartbit commented Feb 5, 2020

Here's the benchmark for my current iMac:

real	3m32.863s
user	11m23.876s
sys	5m13.595s
Hardware:

    Hardware Overview:

      Model Name: iMac
      Model Identifier: iMac17,1
      Processor Name: Quad-Core Intel Core i7
      Processor Speed: 4 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 8 MB
      Hyper-Threading Technology: Enabled
      Memory: 32 GB

Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin19.2.0

@radianttap
Copy link

What those real, user, sys mean actually..?

@hartbit
Copy link
Author

hartbit commented Feb 7, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment