├── VSCOSwiftBenchmarks.xcodeproj
├── xcuserdata
│ └── fielguhit.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── VSCOSwiftBenchmarks.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── fielguhit.xcuserdatad
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── VSCOSwiftBenchmarks.xccheckout
├── xcshareddata
│ └── xcbaselines
│ │ └── 4B7881661A6F11DD00DA59F2.xcbaseline
│ │ ├── 2C3F7181-61CE-4E5A-B06D-78A6D171344D.plist
│ │ └── Info.plist
└── project.pbxproj
├── VSCOSwiftBenchmarks
├── VSCOSwiftBenchmarks-Bridging-Header.h
├── ObjcObject.m
├── ObjcObject.h
├── SwiftObject.swift
├── ViewController.h
├── AppDelegate.h
├── main.m
├── ObjectiveCUtils.h
├── ViewController.m
├── ObjectiveCUtils.m
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.xib
├── Info.plist
├── AppDelegate.m
└── SwiftUtils.swift
├── VSCOSwiftBenchmarksTests
├── Info.plist
├── VSCOObjectiveCBenchmarksTests.m
└── VSCOSwiftBenchmarksTests.swift
└── README.md
/VSCOSwiftBenchmarks.xcodeproj/xcuserdata/fielguhit.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/VSCOSwiftBenchmarks-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
5 | #import "ObjectiveCUtils.h"
6 | #import "ObjcObject.h"
7 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/ObjcObject.m:
--------------------------------------------------------------------------------
1 | //
2 | // ObjcObject.m
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/24/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import "ObjcObject.h"
10 |
11 | @implementation ObjcObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/ObjcObject.h:
--------------------------------------------------------------------------------
1 | //
2 | // ObjcObject.h
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/24/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ObjcObject : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/SwiftObject.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftObject.swift
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/24/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | class SwiftObject : NSObject {
10 |
11 | }
12 |
13 | struct SwiftStructObject {
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/20/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/20/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/20/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks.xcodeproj/project.xcworkspace/xcuserdata/fielguhit.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/ObjectiveCUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // ObjectiveCUtils.h
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/11/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ObjectiveCUtils : NSObject
12 |
13 | + (void)shuffleObjects:(NSMutableArray *)array;
14 | + (void)iterateEmptyLoop:(NSMutableArray *)array;
15 | + (void)emptyMethod;
16 | + (void)sortObjects:(NSMutableArray *)array;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/20/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks.xcodeproj/xcshareddata/xcbaselines/4B7881661A6F11DD00DA59F2.xcbaseline/2C3F7181-61CE-4E5A-B06D-78A6D171344D.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | classNames
6 |
7 | VSCOObjectiveCBenchmarksTests
8 |
9 | testShuffleNumberObjC
10 |
11 | com.apple.XCTPerformanceMetric_WallClockTime
12 |
13 | baselineAverage
14 | 0.2
15 | baselineIntegrationDisplayName
16 | Local Baseline
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks.xcodeproj/xcuserdata/fielguhit.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | VSCOSwiftBenchmarks.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 4B78814D1A6F11DD00DA59F2
16 |
17 | primary
18 |
19 |
20 | 4B7881661A6F11DD00DA59F2
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarksTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/ObjectiveCUtils.m:
--------------------------------------------------------------------------------
1 | //
2 | // ObjectiveCUtils.m
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/11/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import "ObjectiveCUtils.h"
10 |
11 | @implementation ObjectiveCUtils
12 |
13 | + (void)shuffleObjects:(NSMutableArray *)array
14 | {
15 | for (NSInteger i = 0; i < [array count]; i++) {
16 | id currentObject = array[i];
17 | NSUInteger randomIndex = arc4random() % array.count;
18 | id randomObject = array[randomIndex];
19 |
20 | array[i] = randomObject;
21 | array[randomIndex] = currentObject;
22 | }
23 | }
24 |
25 | + (void)iterateEmptyLoop:(NSMutableArray *)array
26 | {
27 | for (NSInteger i = 0; i < [array count]; i++) {
28 |
29 | }
30 | }
31 |
32 | + (void)emptyMethod
33 | {
34 |
35 | }
36 |
37 | + (void)sortObjects:(NSMutableArray *)array
38 | {
39 | // TODO: Benchmark me
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks.xcodeproj/xcshareddata/xcbaselines/4B7881661A6F11DD00DA59F2.xcbaseline/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | runDestinationsByUUID
6 |
7 | 2C3F7181-61CE-4E5A-B06D-78A6D171344D
8 |
9 | localComputer
10 |
11 | busSpeedInMHz
12 | 100
13 | cpuCount
14 | 1
15 | cpuKind
16 | Intel Core i7
17 | cpuSpeedInMHz
18 | 2800
19 | logicalCPUCoresPerPackage
20 | 4
21 | modelCode
22 | MacBookPro11,1
23 | physicalCPUCoresPerPackage
24 | 2
25 | platformIdentifier
26 | com.apple.platform.macosx
27 |
28 | targetArchitecture
29 | x86_64
30 | targetDevice
31 |
32 | modelCode
33 | iPhone7,2
34 | platformIdentifier
35 | com.apple.platform.iphonesimulator
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks.xcodeproj/project.xcworkspace/xcshareddata/VSCOSwiftBenchmarks.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 66A5DE6F-87B0-47BE-A64F-B0117E766F0F
9 | IDESourceControlProjectName
10 | VSCOSwiftBenchmarks
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 7095A91ECF477AAA3560021B55DC114CEB538A7A
14 | github.com:vsco/swift-benchmarks.git
15 |
16 | IDESourceControlProjectPath
17 | VSCOSwiftBenchmarks.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 7095A91ECF477AAA3560021B55DC114CEB538A7A
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:vsco/swift-benchmarks.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 7095A91ECF477AAA3560021B55DC114CEB538A7A
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 7095A91ECF477AAA3560021B55DC114CEB538A7A
36 | IDESourceControlWCCName
37 | VSCOSwiftBenchmarks
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/20/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarksTests/VSCOObjectiveCBenchmarksTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // VSCOSwiftBenchmarksTests.m
3 | // VSCOSwiftBenchmarksTests
4 | //
5 | // Created by Fiel Guhit on 1/20/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "ObjectiveCUtils.h"
12 | #import "ObjcObject.h"
13 | #import "VSCOSwiftBenchmarksTests-Swift.h"
14 |
15 | @interface VSCOObjectiveCBenchmarksTests : XCTestCase
16 |
17 |
18 | @end
19 |
20 | @implementation VSCOObjectiveCBenchmarksTests
21 |
22 | + (NSMutableArray *)createNSNumberArray
23 | {
24 | NSMutableArray *array = [NSMutableArray new];
25 | for (NSUInteger i = 0; i < 1000000; i++) {
26 | [array addObject:@(i)];
27 | }
28 |
29 | return array;
30 | }
31 |
32 | + (NSMutableArray *)createNSStringArray
33 | {
34 | NSMutableArray *array = [NSMutableArray new];
35 | for (NSUInteger i = 0; i < 1000000; i++) {
36 | [array addObject:[NSString stringWithFormat:@"%lu", (unsigned long)i]];
37 | }
38 |
39 | return array;
40 | }
41 |
42 | + (NSMutableArray *)createArrayWithObjectClass:(Class)objectClass
43 | {
44 | NSMutableArray *array = [NSMutableArray new];
45 | for (NSUInteger i = 0; i < 1000000; i++) {
46 | [array addObject:[objectClass new]];
47 | }
48 |
49 | return array;
50 | }
51 |
52 | #pragma mark - Base Case: Shuffle 1,000,000 NSNumber objects in NSMutableArray
53 |
54 | - (void)testShuffleNumberObjC
55 | {
56 | NSMutableArray *objects = [[self class] createNSNumberArray];
57 |
58 | [self measureBlock:^{
59 | [ObjectiveCUtils shuffleObjects:objects];
60 | }];
61 | }
62 |
63 | - (void)testShuffleNumberSwift
64 | {
65 | NSMutableArray *objects = [[self class] createNSNumberArray];
66 |
67 | [self measureBlock:^{
68 | [SwiftUtils shuffleObjects:objects];
69 | }];
70 | }
71 |
72 | #pragma mark - Shuffle 1,000,000 NSString objects in NSMutableArray
73 |
74 | - (void)testShuffleStringObjC
75 | {
76 | NSMutableArray *objects = [[self class] createNSStringArray];
77 |
78 | [self measureBlock:^{
79 | [ObjectiveCUtils shuffleObjects:objects];
80 | }];
81 | }
82 |
83 | - (void)testShuffleStringSwift
84 | {
85 | NSMutableArray *objects = [[self class] createNSStringArray];
86 |
87 | [self measureBlock:^{
88 | [SwiftUtils shuffleObjects:objects];
89 | }];
90 | }
91 |
92 | #pragma mark - Shuffle 1,000,000 ObjcObject objects in NSMutableArray
93 |
94 | - (void)testShuffleObjcObjectsObjC
95 | {
96 | NSMutableArray *objects = [[self class] createArrayWithObjectClass:[ObjcObject class]];
97 |
98 | [self measureBlock:^{
99 | [ObjectiveCUtils shuffleObjects:objects];
100 | }];
101 | }
102 |
103 | - (void)testShuffleObjcObjectsSwift
104 | {
105 | NSMutableArray *objects = [[self class] createArrayWithObjectClass:[ObjcObject class]];
106 |
107 | [self measureBlock:^{
108 | [SwiftUtils shuffleObjects:objects];
109 | }];
110 | }
111 |
112 | #pragma mark - Shuffle 1,000,000 SwiftObject objects in NSMutableArray
113 |
114 | - (void)testShuffleSwiftObjectsObjC
115 | {
116 | NSMutableArray *objects = [[self class] createArrayWithObjectClass:[SwiftObject class]];
117 |
118 | [self measureBlock:^{
119 | [ObjectiveCUtils shuffleObjects:objects];
120 | }];
121 | }
122 |
123 | - (void)testShuffleSwiftObjectsSwift
124 | {
125 | NSMutableArray *objects = [[self class] createArrayWithObjectClass:[SwiftObject class]];
126 |
127 | [self measureBlock:^{
128 | [SwiftUtils shuffleObjects:objects];
129 | }];
130 | }
131 |
132 | #pragma mark - Iterate 1,000,000 objects with NSMutableArray
133 |
134 | - (void)testIterateObjectsObjC
135 | {
136 | NSMutableArray *objects = [[self class] createNSNumberArray];
137 |
138 | [self measureBlock:^{
139 | [ObjectiveCUtils iterateEmptyLoop:objects];
140 | }];
141 | }
142 |
143 | - (void)testIterateObjectsSwift
144 | {
145 | NSMutableArray *objects = [[self class] createNSNumberArray];
146 |
147 | [self measureBlock:^{
148 | [SwiftUtils iterateEmptyLoop:objects];
149 | }];
150 | }
151 |
152 | #pragma mark - Call empty class method no parameters
153 |
154 | - (void)testCallEmptyClassMethodObjC
155 | {
156 | [self measureBlock:^{
157 | [ObjectiveCUtils emptyMethod];
158 | }];
159 | }
160 |
161 | - (void)testCallEmptyClassMethodSwift
162 | {
163 | [self measureBlock:^{
164 | [SwiftUtils emptyMethod];
165 | }];
166 | }
167 |
168 | @end
169 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks.xcodeproj/xcuserdata/fielguhit.xcuserdatad/xcschemes/VSCOSwiftBenchmarks.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
67 |
68 |
78 |
80 |
86 |
87 |
88 |
89 |
90 |
91 |
97 |
99 |
105 |
106 |
107 |
108 |
110 |
111 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks/SwiftUtils.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftUtils.swift
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/20/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class SwiftUtils: NSObject {
12 |
13 | @objc class func shuffleObjects(array: NSMutableArray) {
14 | for (var i = 0; i < array.count; i++) {
15 | let currentObject: AnyObject = array[i]
16 | let randomIndex = Int(arc4random()) % array.count
17 | let randomObject: AnyObject = array[randomIndex]
18 |
19 | array[i] = randomObject;
20 | array[randomIndex] = currentObject
21 | }
22 | }
23 |
24 | class func shuffleAnyObjectObjects(inout array: [AnyObject]) {
25 | for (var i = 0; i < array.count; i++) {
26 | let currentObject: AnyObject = array[i]
27 | let randomIndex = Int(arc4random()) % array.count
28 | let randomObject: AnyObject = array[randomIndex]
29 |
30 | array[i] = randomObject;
31 | array[randomIndex] = currentObject
32 | }
33 | }
34 |
35 | class func shuffleAny(inout array: [Any]) {
36 | for (var i = 0; i < array.count; i++) {
37 | let currentObject: Any = array[i]
38 | let randomIndex = Int(arc4random()) % array.count
39 | let randomObject: Any = array[randomIndex]
40 |
41 | array[i] = randomObject;
42 | array[randomIndex] = currentObject
43 | }
44 | }
45 |
46 | class func shuffleIntObjects(inout array: [Int]) {
47 | for (var i = 0; i < array.count; i++) {
48 | let currentObject: Int = array[i]
49 | let randomIndex = Int(arc4random()) % array.count
50 | let randomObject: Int = array[randomIndex]
51 |
52 | array[i] = randomObject;
53 | array[randomIndex] = currentObject
54 | }
55 | }
56 |
57 | class func shuffleGenericObjects(inout array:[T]) {
58 | for (var i = 0; i < array.count; i++) {
59 | let currentObject: T = array[i]
60 | let randomIndex = Int(arc4random()) % array.count
61 | let randomObject: T = array[randomIndex]
62 |
63 | array[i] = randomObject;
64 | array[randomIndex] = currentObject
65 | }
66 | }
67 |
68 | class func shuffleStringObjects(inout array:[String]) {
69 | for (var i = 0; i < array.count; i++) {
70 | let currentObject: String = array[i]
71 | let randomIndex = Int(arc4random()) % array.count
72 | let randomObject: String = array[randomIndex]
73 |
74 | array[i] = randomObject;
75 | array[randomIndex] = currentObject
76 | }
77 | }
78 |
79 | class func shuffleObjcObjects(inout array:[ObjcObject]) {
80 | for (var i = 0; i < array.count; i++) {
81 | let currentObject: ObjcObject = array[i]
82 | let randomIndex = Int(arc4random()) % array.count
83 | let randomObject: ObjcObject = array[randomIndex]
84 |
85 | array[i] = randomObject;
86 | array[randomIndex] = currentObject
87 | }
88 | }
89 |
90 | class func shuffleSwiftObjects(inout array:[SwiftObject]) {
91 | for (var i = 0; i < array.count; i++) {
92 | let currentObject: SwiftObject = array[i]
93 | let randomIndex = Int(arc4random()) % array.count
94 | let randomObject: SwiftObject = array[randomIndex]
95 |
96 | array[i] = randomObject;
97 | array[randomIndex] = currentObject
98 | }
99 | }
100 |
101 | class func shuffleSwiftStructObjects(inout array:[SwiftStructObject]) {
102 | for (var i = 0; i < array.count; i++) {
103 | let currentObject: SwiftStructObject = array[i]
104 | let randomIndex = Int(arc4random()) % array.count
105 | let randomObject: SwiftStructObject = array[randomIndex]
106 |
107 | array[i] = randomObject;
108 | array[randomIndex] = currentObject
109 | }
110 | }
111 |
112 | @objc class func iterateEmptyLoop(array: NSMutableArray) {
113 | for (var i = 0; i < array.count; i++) {
114 |
115 | }
116 | }
117 |
118 | class func iterateEmptyLoopForSwiftArray(array: [Int]) {
119 | for (var i = 0; i < array.count; i++) {
120 |
121 | }
122 | }
123 |
124 | class func shuffleGenericObjectsFinal(inout array:[T]) {
125 | for (var i = 0; i < array.count; i++) {
126 | let currentObject: T = array[i]
127 | let randomIndex = Int(arc4random()) % array.count
128 | let randomObject: T = array[randomIndex]
129 |
130 | array[i] = randomObject;
131 | array[randomIndex] = currentObject
132 | }
133 | }
134 |
135 | class func emptyMethod() {
136 |
137 | }
138 |
139 | class func sortObjects(inout array:[T]) {
140 | // TODO: Benchmark me
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarksTests/VSCOSwiftBenchmarksTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // VSCOSwiftBenchmarksTests.swift
3 | // VSCOSwiftBenchmarks
4 | //
5 | // Created by Fiel Guhit on 1/20/15.
6 | // Copyright (c) 2015 VSCO. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class VSCOSwiftBenchmarksTests: XCTestCase {
13 |
14 | class func createNSMutableArray(objectFunc: Int -> T) -> NSMutableArray {
15 | let mutableArrayObjects = NSMutableArray()
16 | for (var i = 0; i < 1000000; i++) {
17 | mutableArrayObjects.addObject(objectFunc(i))
18 | }
19 |
20 | return mutableArrayObjects
21 | }
22 |
23 | class func createSwiftArray(objectFunc: Int -> T) -> [T] {
24 | var objects = [T]()
25 | for (var i = 0; i < 1000000; i++) {
26 | objects.append(objectFunc(i))
27 | }
28 |
29 | return objects
30 | }
31 |
32 | // MARK: Base Case: Shuffle 1,000,000 Int objects in [AnyObject] array
33 |
34 | func testShuffleAnyObjectObjC() {
35 | let mutableArrayObjects = self.dynamicType.createNSMutableArray() { index -> NSNumber in
36 | return NSNumber(integer: index)
37 | }
38 |
39 | self.measureBlock() {
40 | ObjectiveCUtils.shuffleObjects(mutableArrayObjects)
41 | }
42 | }
43 |
44 | func testShuffleAnyObjectSwift() {
45 | var anyObjects = self.dynamicType.createSwiftArray() { index -> AnyObject in
46 | return index
47 | }
48 |
49 | self.measureBlock() {
50 | SwiftUtils.shuffleAnyObjectObjects(&anyObjects)
51 | }
52 | }
53 |
54 | // MARK: Shuffle 1,000,000 Int objects in [Any] array
55 |
56 | func testShuffleAnyObjC() {
57 | // Same as testShuffleAnyObjectObjC
58 | }
59 |
60 | func testShuffleAnySwift() {
61 | var anyObjects = self.dynamicType.createSwiftArray() { index -> Any in
62 | return index
63 | }
64 |
65 | self.measureBlock() {
66 | SwiftUtils.shuffleAny(&anyObjects)
67 | }
68 | }
69 |
70 | // MARK: Shuffle 1,000,000 Int objects in [Int] array
71 |
72 | func testShuffleIntObjC() {
73 | // Same as testShuffleAnyObjectObjC
74 | }
75 |
76 | func testShuffleIntSwift() {
77 | var objects = self.dynamicType.createSwiftArray() { index -> Int in
78 | return index
79 | }
80 |
81 | self.measureBlock() {
82 | SwiftUtils.shuffleIntObjects(&objects)
83 | }
84 | }
85 |
86 | // MARK: Shuffle 1,000,000 Int objects in [T] array
87 |
88 | func testShuffleGenericObjC() {
89 | // Same as testShuffleAnyObjectObjC
90 | }
91 |
92 | func testShuffleGenericSwift() {
93 | var objects = self.dynamicType.createSwiftArray() { index -> Int in
94 | return index
95 | }
96 |
97 | self.measureBlock() {
98 | SwiftUtils.shuffleGenericObjects(&objects)
99 | }
100 | }
101 |
102 | // MARK: Shuffle 1,000,000 String objects in [String] array
103 |
104 | func testShuffleStringObjC() {
105 | let mutableArrayObjects = self.dynamicType.createNSMutableArray() { index -> NSString in
106 | return NSString(string: "\(index)")
107 | }
108 |
109 | self.measureBlock() {
110 | ObjectiveCUtils.shuffleObjects(mutableArrayObjects)
111 | }
112 | }
113 |
114 | func testShuffleStringSwift() {
115 | var stringObjects = self.dynamicType.createSwiftArray() { index -> String in
116 | return "\(index)"
117 | }
118 |
119 | self.measureBlock() {
120 | SwiftUtils.shuffleStringObjects(&stringObjects)
121 | }
122 | }
123 |
124 | // MARK: Shuffle 1,000,000 ObjcObject objects in [ObjcObject] array
125 |
126 | func testShuffleObjcObjectObjC() {
127 | let mutableArrayObjects = self.dynamicType.createNSMutableArray() { index -> ObjcObject in
128 | return ObjcObject()
129 | }
130 |
131 | self.measureBlock() {
132 | ObjectiveCUtils.shuffleObjects(mutableArrayObjects)
133 | }
134 | }
135 |
136 | func testShuffleObjcObjectSwift() {
137 | var objcObjects = self.dynamicType.createSwiftArray() { index -> ObjcObject in
138 | return ObjcObject()
139 | }
140 |
141 | self.measureBlock() {
142 | SwiftUtils.shuffleObjcObjects(&objcObjects)
143 | }
144 | }
145 |
146 | // MARK: Shuffle 1,000,000 SwiftObject objects in [SwiftObject] array
147 |
148 | func testShuffleSwiftObjectObjC() {
149 | let mutableArrayObjects = self.dynamicType.createNSMutableArray() { index -> SwiftObject in
150 | return SwiftObject()
151 | }
152 |
153 | self.measureBlock() {
154 | ObjectiveCUtils.shuffleObjects(mutableArrayObjects)
155 | }
156 | }
157 |
158 | func testShuffleSwiftObjectSwift() {
159 | var swiftObjects = self.dynamicType.createSwiftArray() { index -> SwiftObject in
160 | return SwiftObject()
161 | }
162 |
163 | self.measureBlock() {
164 | SwiftUtils.shuffleSwiftObjects(&swiftObjects)
165 | }
166 | }
167 |
168 | // MARK: Shuffle 1,000,000 SwiftStructObject objects in [SwiftStructObject] array
169 |
170 | func testShuffleSwiftStructObjectObjC() {
171 | // Cannot add SwiftStructObject to NSMutableArray
172 | }
173 |
174 | func testShuffleSwiftStructObjectSwift() {
175 | var swiftObjects = self.dynamicType.createSwiftArray() { index -> SwiftStructObject in
176 | return SwiftStructObject()
177 | }
178 |
179 | self.measureBlock() {
180 | SwiftUtils.shuffleSwiftStructObjects(&swiftObjects)
181 | }
182 | }
183 |
184 | // MARK: Iterate 1,000,000 objects with [Int] array
185 | func testIterateObjectsObjC() {
186 | let mutableArrayObjects = self.dynamicType.createNSMutableArray() { index -> NSNumber in
187 | return NSNumber(integer: index)
188 | }
189 |
190 | self.measureBlock() {
191 | ObjectiveCUtils.iterateEmptyLoop(mutableArrayObjects)
192 | }
193 | }
194 |
195 | func testIterateObjectsSwift() {
196 | let intObjects = self.dynamicType.createSwiftArray() { index -> Int in
197 | return index
198 | }
199 |
200 | self.measureBlock() {
201 | SwiftUtils.iterateEmptyLoopForSwiftArray(intObjects)
202 | }
203 | }
204 |
205 | // MARK: Call empty class method no parameters
206 |
207 | func testCallEmptyClassMethodObjC() {
208 | self.measureBlock() {
209 | ObjectiveCUtils.emptyMethod()
210 | }
211 | }
212 |
213 | func testCallEmptyClassMethodSwift() {
214 | self.measureBlock() {
215 | SwiftUtils.emptyMethod()
216 | }
217 | }
218 | }
219 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Swift Compiler optimization level for unit tests set to -O
2 | Apple LLVM 6.0/7.0 Optimization Level set to Fastest, Aggressive Optimizations -Ofast
3 |
4 | ### **Tests written in Objective-C**
5 | ##### Shuffle 1,000,000 NSNumber objects in NSMutableArray
6 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
7 | |---|---|---|---|---|
8 | |Swift 1.1| 0.304 seconds 5% STDEV| 0.376 seconds 1% STDEV|-|iPhone 6 (8.3)|
9 | |Swift 1.2| 0.281 seconds 3% STDEV| 0.303 seconds 1% STDEV|-|iPhone 6 (8.3)|
10 | |Swift 2.0| 0.270 seconds 2% STDEV| 0.273 seconds 2% STDEV|-|iPhone 6 (8.3)|
11 | |Swift 2.1| 0.313 seconds 2% STDEV| 0.318 seconds 3% STDEV|-|iPhone 6 (9.2)|
12 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 0.259 seconds 3% STDEV| 0.261 seconds 2% STDEV|-|iPhone 6 (9.2)|
13 |
14 | ##### Shuffle 1,000,000 NSString objects in NSMutableArray
15 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
16 | |---|---|---|---|---|
17 | |Swift 1.1| 1.091 seconds 2% STDEV| 1.290 seconds 3% STDEV|-|iPhone 6 (8.3)|
18 | |Swift 1.2| 1.129 seconds 3% STDEV| 1.238 seconds 2% STDEV|-|iPhone 6 (8.3)|
19 | |Swift 2.0| 1.106 seconds 2% STDEV| 1.096 seconds 1% STDEV|-|iPhone 6 (8.3)|
20 | |Swift 2.1| 0.307 seconds 2% STDEV| 0.312 seconds 2% STDEV|-|iPhone 6 (9.2)|
21 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 0.258 seconds 4% STDEV| 0.265 seconds 6% STDEV|-|iPhone 6 (9.2)|
22 |
23 | ##### Shuffle 1,000,000 ObjcObject objects in NSMutableArray
24 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
25 | |---|---|---|---|---|
26 | |Swift 1.1| 0.839 seconds 4% STDEV| 1.014 seconds 4% STDEV|-|iPhone 6 (8.3)|
27 | |Swift 1.2| 0.799 seconds 3% STDEV| 0.867 seconds 1% STDEV|-|iPhone 6 (8.3)|
28 | |Swift 2.0| 0.791 seconds 4% STDEV| 0.798 seconds 2% STDEV|-|iPhone 6 (8.3)|
29 | |Swift 2.1| 0.877 seconds 2% STDEV| 0.862 seconds 1% STDEV|-|iPhone 6 (9.2)|
30 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 0.775 seconds 4% STDEV| 0.780 seconds 4% STDEV|-|iPhone 6 (9.2)|
31 |
32 | ##### Shuffle 1,000,000 SwiftObject objects in NSMutableArray
33 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
34 | |---|---|---|---|---|
35 | |Swift 1.1| 0.818 seconds 1% STDEV| 1.015 seconds 1% STDEV|-|iPhone 6 (8.3)|
36 | |Swift 1.2| 0.854 seconds 2% STDEV| 0.898 seconds 2% STDEV|-|iPhone 6 (8.3)|
37 | |Swift 2.0| 0.808 seconds 2% STDEV| 0.817 seconds 2% STDEV|-|iPhone 6 (8.3)|
38 | |Swift 2.1| 0.861 seconds 3% STDEV| 0.853 seconds 3% STDEV|-|iPhone 6 (9.2)|
39 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 0.769 seconds 4% STDEV| 0.779 seconds 6% STDEV|-|iPhone 6 (9.2)|
40 |
41 | ##### Empty loop 1,000,000 objects with NSMutableArray
42 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
43 | |---|---|---|---|---|
44 | |Swift 1.1| 0.006 seconds 2% STDEV| 0.005 seconds 9% STDEV|-|iPhone 6 (8.3)|
45 | |Swift 1.2| 0.004 seconds 3% STDEV| 0.005 seconds 10% STDEV|-|iPhone 6 (8.3)|
46 | |Swift 2.0| 0.004 seconds 3% STDEV| 0.004 seconds 2% STDEV|-|iPhone 6 (8.3)|
47 | |Swift 2.1| 0.005 seconds 8% STDEV| 0.005 seconds 11% STDEV|-|iPhone 6 (9.2)|
48 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 0.006 seconds 36% STDEV| 0.005 seconds 2% STDEV|-|iPhone 6 (9.2)|
49 |
50 | ### **Tests written in Swift**
51 | ##### Shuffle 1,000,000 Int objects with Swift implementation taking [AnyObject]
52 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
53 | |---|---|---|---|---|
54 | |Swift 1.1| 0.296 seconds 1% STDEV|-| 1.616 seconds 2% STDEV|iPhone 6 (8.3)|
55 | |Swift 1.2| 0.262 seconds 1% STDEV|-| 0.523 seconds 1% STDEV|iPhone 6 (8.3)|
56 | |Swift 2.0| 0.271 seconds 2% STDEV|-| 0.285 seconds 2% STDEV|iPhone 6 (8.3)|
57 | |Swift 2.1| 0.305 seconds 1% STDEV|-| 0.336 seconds 5% STDEV|iPhone 6 (9.2)|
58 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 0.256 seconds 1% STDEV|-| 0.284 seconds 7% STDEV|iPhone 6 (9.2)|
59 |
60 | ##### Shuffle 1,000,000 Int objects with Swift implementation taking [Any]
61 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
62 | |---|---|---|---|---|
63 | |Swift 1.1| Same as above |-| 0.537 seconds 3% STDEV|iPhone 6 (8.3)|
64 | |Swift 1.2| Same as above |-| 0.289 seconds 2% STDEV|iPhone 6 (8.3)|
65 | |Swift 2.0| Same as above |-| 0.303 seconds 2% STDEV|iPhone 6 (8.3)|
66 | |Swift 2.1| Same as above |-| 0.378 seconds 6% STDEV|iPhone 6 (9.2)|
67 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| Same as above |-| 0.340 seconds 3% STDEV|iPhone 6 (9.2)|
68 |
69 | ##### Shuffle 1,000,000 Int objects with Swift implementation taking [Int]
70 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
71 | |---|---|---|---|---|
72 | |Swift 1.1| Same as above |-| 0.181 seconds 2% STDEV|iPhone 6 (8.3)|
73 | |Swift 1.2| Same as above |-| 0.189 seconds 2% STDEV|iPhone 6 (8.3)|
74 | |Swift 2.0| Same as above |-| 0.197 seconds 5% STDEV|iPhone 6 (8.3)|
75 | |Swift 2.1| Same as above |-| 0.240 seconds 2% STDEV|iPhone 6 (9.2)|
76 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| Same as above |-| 0.198 seconds 6% STDEV|iPhone 6 (9.2)|
77 |
78 | ##### Shuffle 1,000,000 Int objects with Swift implementation taking [T]
79 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
80 | |---|---|---|---|---|
81 | |Swift 1.1| Same as above |-| 32.627 seconds 1% STDEV|iPhone 6 (8.3)|
82 | |Swift 1.2| Same as above |-| 2.155 seconds 1% STDEV|iPhone 6 (8.3)|
83 | |Swift 2.0| Same as above |-| 1.478 seconds 2% STDEV|iPhone 6 (8.3)|
84 | |Swift 2.1| Same as above |-| 2.025 seconds 1% STDEV|iPhone 6 (9.2)|
85 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| Same as above |-| 2.185 seconds 2% STDEV|iPhone 6 (9.2)|
86 |
87 | ##### Shuffle 1,000,000 String objects with Swift implementation taking [String]
88 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
89 | |---|---|---|---|---|
90 | |Swift 1.1| 1.137 seconds 2% STDEV |-| 0.829 seconds 2% STDEV|iPhone 6 (8.3)|
91 | |Swift 1.2| 1.112 seconds 3% STDEV |-| 0.891 seconds 3% STDEV|iPhone 6 (8.3)|
92 | |Swift 2.0| 1.114 seconds 2% STDEV |-| 0.925 seconds 1% STDEV|iPhone 6 (8.3)|
93 | |Swift 2.1| 1.253 seconds 3% STDEV |-| 1.010 seconds 3% STDEV|iPhone 6 (9.2)|
94 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 1.138 seconds 2% STDEV |-| 0.878 seconds 2% STDEV|iPhone 6 (9.2)|
95 |
96 | ##### Shuffle 1,000,000 ObjcObject objects with Swift implementation taking [ObjcObject]
97 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
98 | |---|---|---|---|---|
99 | |Swift 1.1| 0.816 seconds 3% STDEV |-| 2.529 seconds 1% STDEV|iPhone 6 (8.3)|
100 | |Swift 1.2| 0.794 seconds 2% STDEV |-| 1.252 seconds 1% STDEV|iPhone 6 (8.3)|
101 | |Swift 2.0| 0.794 seconds 2% STDEV |-| 0.820 seconds 2% STDEV|iPhone 6 (8.3)|
102 | |Swift 2.1| 0.827 seconds 4% STDEV |-| 0.895 seconds 2% STDEV|iPhone 6 (9.2)|
103 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 0.748 seconds 4% STDEV |-| 0.810 seconds 1% STDEV|iPhone 6 (9.2)|
104 |
105 | ##### Shuffle 1,000,000 SwiftObject objects with Swift implementation taking [SwiftObject]
106 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
107 | |---|---|---|---|---|
108 | |Swift 1.1| 0.826 seconds 2% STDEV |-| 2.527 seconds 1% STDEV|iPhone 6 (8.3)|
109 | |Swift 1.2| 0.795 seconds 2% STDEV |-| 1.352 seconds 1% STDEV|iPhone 6 (8.3)|
110 | |Swift 2.0| 0.796 seconds 2% STDEV |-| 0.830 seconds 3% STDEV|iPhone 6 (8.3)|
111 | |Swift 2.1| 0.835 seconds 4% STDEV |-| 0.887 seconds 3% STDEV|iPhone 6 (9.2)|
112 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 0.755 seconds 3% STDEV |-| 0.809 seconds 3% STDEV|iPhone 6 (9.2)|
113 |
114 | ##### Shuffle 1,000,000 SwiftStructObject objects with Swift implementation taking [SwiftStructObject]
115 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
116 | |---|---|---|---|---|
117 | |Swift 1.1| -|-| 0.070 seconds 1% STDEV|iPhone 6 (8.3)|
118 | |Swift 1.2| -|-| 0.065 seconds 3% STDEV|iPhone 6 (8.3)|
119 | |Swift 2.0| -|-| 0.067 seconds 2% STDEV|iPhone 6 (8.3)|
120 | |Swift 2.1| -|-| 0.067 seconds 5% STDEV|iPhone 6 (9.2)|
121 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| -|-| 0.069 seconds 17% STDEV|iPhone 6 (9.2)|
122 |
123 | ##### Empty loop 1,000,000 Int objects in [Int]
124 | |Version|Objective-C|Bridgeable Swift|Swift|Device (iOS Version)|
125 | |---|---|---|---|---|
126 | |Swift 1.1| 0.010 seconds 38% STDEV |-| 0.003 seconds 49% STDEV|iPhone 6 (8.3)|
127 | |Swift 1.2| 0.005 seconds 10% STDEV |-| 0.001 seconds 20% STDEV|iPhone 6 (8.3)|
128 | |Swift 2.0| 0.005 seconds 23% STDEV |-| 0.001 seconds 10% STDEV|iPhone 6 (8.3)|
129 | |Swift 2.1| 0.005 seconds 35% STDEV |-| 0.001 seconds 9% STDEV|iPhone 6 (9.2)|
130 | |[Swift 2.2 Snapshot](https://swift.org/builds/xcode/swift-2.2-SNAPSHOT-2015-12-01-a/swift-2.2-SNAPSHOT-2015-12-01-a-osx.pkg)| 0.005 seconds 24% STDEV |-| 0.000 seconds 106% STDEV|iPhone 6 (9.2)|
131 |
--------------------------------------------------------------------------------
/VSCOSwiftBenchmarks.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 4B4856521A7479BE00043AE3 /* SwiftObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4856511A7479BE00043AE3 /* SwiftObject.swift */; };
11 | 4B4856531A7479BE00043AE3 /* SwiftObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4856511A7479BE00043AE3 /* SwiftObject.swift */; };
12 | 4B4856561A7479E800043AE3 /* ObjcObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B4856551A7479E800043AE3 /* ObjcObject.m */; };
13 | 4B4856571A7479E800043AE3 /* ObjcObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B4856551A7479E800043AE3 /* ObjcObject.m */; };
14 | 4B7881541A6F11DD00DA59F2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7881531A6F11DD00DA59F2 /* main.m */; };
15 | 4B7881571A6F11DD00DA59F2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7881561A6F11DD00DA59F2 /* AppDelegate.m */; };
16 | 4B78815A1A6F11DD00DA59F2 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7881591A6F11DD00DA59F2 /* ViewController.m */; };
17 | 4B78815D1A6F11DD00DA59F2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B78815B1A6F11DD00DA59F2 /* Main.storyboard */; };
18 | 4B78815F1A6F11DD00DA59F2 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B78815E1A6F11DD00DA59F2 /* Images.xcassets */; };
19 | 4B7881621A6F11DD00DA59F2 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B7881601A6F11DD00DA59F2 /* LaunchScreen.xib */; };
20 | 4B78816E1A6F11DD00DA59F2 /* VSCOObjectiveCBenchmarksTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B78816D1A6F11DD00DA59F2 /* VSCOObjectiveCBenchmarksTests.m */; };
21 | 4B7881791A6F11FA00DA59F2 /* ObjectiveCUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7881781A6F11FA00DA59F2 /* ObjectiveCUtils.m */; };
22 | 4B78817A1A6F11FA00DA59F2 /* ObjectiveCUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7881781A6F11FA00DA59F2 /* ObjectiveCUtils.m */; };
23 | 4B78817E1A6F122A00DA59F2 /* SwiftUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B78817D1A6F122A00DA59F2 /* SwiftUtils.swift */; };
24 | 4B78817F1A6F122A00DA59F2 /* SwiftUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B78817D1A6F122A00DA59F2 /* SwiftUtils.swift */; };
25 | 4B7881811A6F132100DA59F2 /* VSCOSwiftBenchmarksTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B7881801A6F132100DA59F2 /* VSCOSwiftBenchmarksTests.swift */; };
26 | /* End PBXBuildFile section */
27 |
28 | /* Begin PBXContainerItemProxy section */
29 | 4B7881681A6F11DD00DA59F2 /* PBXContainerItemProxy */ = {
30 | isa = PBXContainerItemProxy;
31 | containerPortal = 4B7881461A6F11DD00DA59F2 /* Project object */;
32 | proxyType = 1;
33 | remoteGlobalIDString = 4B78814D1A6F11DD00DA59F2;
34 | remoteInfo = VSCOSwiftBenchmarks;
35 | };
36 | /* End PBXContainerItemProxy section */
37 |
38 | /* Begin PBXFileReference section */
39 | 4B4856511A7479BE00043AE3 /* SwiftObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftObject.swift; sourceTree = ""; };
40 | 4B4856541A7479E800043AE3 /* ObjcObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjcObject.h; sourceTree = ""; };
41 | 4B4856551A7479E800043AE3 /* ObjcObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjcObject.m; sourceTree = ""; };
42 | 4B78814E1A6F11DD00DA59F2 /* VSCOSwiftBenchmarks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VSCOSwiftBenchmarks.app; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 4B7881521A6F11DD00DA59F2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
44 | 4B7881531A6F11DD00DA59F2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
45 | 4B7881551A6F11DD00DA59F2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
46 | 4B7881561A6F11DD00DA59F2 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
47 | 4B7881581A6F11DD00DA59F2 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
48 | 4B7881591A6F11DD00DA59F2 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
49 | 4B78815C1A6F11DD00DA59F2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 4B78815E1A6F11DD00DA59F2 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
51 | 4B7881611A6F11DD00DA59F2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
52 | 4B7881671A6F11DD00DA59F2 /* VSCOSwiftBenchmarksTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VSCOSwiftBenchmarksTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
53 | 4B78816C1A6F11DD00DA59F2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
54 | 4B78816D1A6F11DD00DA59F2 /* VSCOObjectiveCBenchmarksTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VSCOObjectiveCBenchmarksTests.m; sourceTree = ""; };
55 | 4B7881771A6F11FA00DA59F2 /* ObjectiveCUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectiveCUtils.h; sourceTree = ""; };
56 | 4B7881781A6F11FA00DA59F2 /* ObjectiveCUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjectiveCUtils.m; sourceTree = ""; };
57 | 4B78817B1A6F122900DA59F2 /* VSCOSwiftBenchmarks-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VSCOSwiftBenchmarks-Bridging-Header.h"; sourceTree = ""; };
58 | 4B78817D1A6F122A00DA59F2 /* SwiftUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftUtils.swift; sourceTree = ""; };
59 | 4B7881801A6F132100DA59F2 /* VSCOSwiftBenchmarksTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VSCOSwiftBenchmarksTests.swift; sourceTree = ""; };
60 | /* End PBXFileReference section */
61 |
62 | /* Begin PBXFrameworksBuildPhase section */
63 | 4B78814B1A6F11DD00DA59F2 /* Frameworks */ = {
64 | isa = PBXFrameworksBuildPhase;
65 | buildActionMask = 2147483647;
66 | files = (
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | 4B7881641A6F11DD00DA59F2 /* Frameworks */ = {
71 | isa = PBXFrameworksBuildPhase;
72 | buildActionMask = 2147483647;
73 | files = (
74 | );
75 | runOnlyForDeploymentPostprocessing = 0;
76 | };
77 | /* End PBXFrameworksBuildPhase section */
78 |
79 | /* Begin PBXGroup section */
80 | 4B48564F1A7479A300043AE3 /* Utils */ = {
81 | isa = PBXGroup;
82 | children = (
83 | 4B7881771A6F11FA00DA59F2 /* ObjectiveCUtils.h */,
84 | 4B7881781A6F11FA00DA59F2 /* ObjectiveCUtils.m */,
85 | 4B78817D1A6F122A00DA59F2 /* SwiftUtils.swift */,
86 | );
87 | name = Utils;
88 | sourceTree = "";
89 | };
90 | 4B4856501A7479AA00043AE3 /* Objects */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 4B4856511A7479BE00043AE3 /* SwiftObject.swift */,
94 | 4B4856541A7479E800043AE3 /* ObjcObject.h */,
95 | 4B4856551A7479E800043AE3 /* ObjcObject.m */,
96 | );
97 | name = Objects;
98 | sourceTree = "";
99 | };
100 | 4B7881451A6F11DD00DA59F2 = {
101 | isa = PBXGroup;
102 | children = (
103 | 4B7881501A6F11DD00DA59F2 /* VSCOSwiftBenchmarks */,
104 | 4B78816A1A6F11DD00DA59F2 /* VSCOSwiftBenchmarksTests */,
105 | 4B78814F1A6F11DD00DA59F2 /* Products */,
106 | );
107 | sourceTree = "";
108 | };
109 | 4B78814F1A6F11DD00DA59F2 /* Products */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 4B78814E1A6F11DD00DA59F2 /* VSCOSwiftBenchmarks.app */,
113 | 4B7881671A6F11DD00DA59F2 /* VSCOSwiftBenchmarksTests.xctest */,
114 | );
115 | name = Products;
116 | sourceTree = "";
117 | };
118 | 4B7881501A6F11DD00DA59F2 /* VSCOSwiftBenchmarks */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 4B7881551A6F11DD00DA59F2 /* AppDelegate.h */,
122 | 4B7881561A6F11DD00DA59F2 /* AppDelegate.m */,
123 | 4B7881581A6F11DD00DA59F2 /* ViewController.h */,
124 | 4B7881591A6F11DD00DA59F2 /* ViewController.m */,
125 | 4B4856501A7479AA00043AE3 /* Objects */,
126 | 4B48564F1A7479A300043AE3 /* Utils */,
127 | 4B78815B1A6F11DD00DA59F2 /* Main.storyboard */,
128 | 4B78815E1A6F11DD00DA59F2 /* Images.xcassets */,
129 | 4B7881601A6F11DD00DA59F2 /* LaunchScreen.xib */,
130 | 4B7881511A6F11DD00DA59F2 /* Supporting Files */,
131 | 4B78817B1A6F122900DA59F2 /* VSCOSwiftBenchmarks-Bridging-Header.h */,
132 | );
133 | path = VSCOSwiftBenchmarks;
134 | sourceTree = "";
135 | };
136 | 4B7881511A6F11DD00DA59F2 /* Supporting Files */ = {
137 | isa = PBXGroup;
138 | children = (
139 | 4B7881521A6F11DD00DA59F2 /* Info.plist */,
140 | 4B7881531A6F11DD00DA59F2 /* main.m */,
141 | );
142 | name = "Supporting Files";
143 | sourceTree = "";
144 | };
145 | 4B78816A1A6F11DD00DA59F2 /* VSCOSwiftBenchmarksTests */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 4B78816D1A6F11DD00DA59F2 /* VSCOObjectiveCBenchmarksTests.m */,
149 | 4B7881801A6F132100DA59F2 /* VSCOSwiftBenchmarksTests.swift */,
150 | 4B78816B1A6F11DD00DA59F2 /* Supporting Files */,
151 | );
152 | path = VSCOSwiftBenchmarksTests;
153 | sourceTree = "";
154 | };
155 | 4B78816B1A6F11DD00DA59F2 /* Supporting Files */ = {
156 | isa = PBXGroup;
157 | children = (
158 | 4B78816C1A6F11DD00DA59F2 /* Info.plist */,
159 | );
160 | name = "Supporting Files";
161 | sourceTree = "";
162 | };
163 | /* End PBXGroup section */
164 |
165 | /* Begin PBXNativeTarget section */
166 | 4B78814D1A6F11DD00DA59F2 /* VSCOSwiftBenchmarks */ = {
167 | isa = PBXNativeTarget;
168 | buildConfigurationList = 4B7881711A6F11DD00DA59F2 /* Build configuration list for PBXNativeTarget "VSCOSwiftBenchmarks" */;
169 | buildPhases = (
170 | 4B78814A1A6F11DD00DA59F2 /* Sources */,
171 | 4B78814B1A6F11DD00DA59F2 /* Frameworks */,
172 | 4B78814C1A6F11DD00DA59F2 /* Resources */,
173 | );
174 | buildRules = (
175 | );
176 | dependencies = (
177 | );
178 | name = VSCOSwiftBenchmarks;
179 | productName = VSCOSwiftBenchmarks;
180 | productReference = 4B78814E1A6F11DD00DA59F2 /* VSCOSwiftBenchmarks.app */;
181 | productType = "com.apple.product-type.application";
182 | };
183 | 4B7881661A6F11DD00DA59F2 /* VSCOSwiftBenchmarksTests */ = {
184 | isa = PBXNativeTarget;
185 | buildConfigurationList = 4B7881741A6F11DD00DA59F2 /* Build configuration list for PBXNativeTarget "VSCOSwiftBenchmarksTests" */;
186 | buildPhases = (
187 | 4B7881631A6F11DD00DA59F2 /* Sources */,
188 | 4B7881641A6F11DD00DA59F2 /* Frameworks */,
189 | 4B7881651A6F11DD00DA59F2 /* Resources */,
190 | );
191 | buildRules = (
192 | );
193 | dependencies = (
194 | 4B7881691A6F11DD00DA59F2 /* PBXTargetDependency */,
195 | );
196 | name = VSCOSwiftBenchmarksTests;
197 | productName = VSCOSwiftBenchmarksTests;
198 | productReference = 4B7881671A6F11DD00DA59F2 /* VSCOSwiftBenchmarksTests.xctest */;
199 | productType = "com.apple.product-type.bundle.unit-test";
200 | };
201 | /* End PBXNativeTarget section */
202 |
203 | /* Begin PBXProject section */
204 | 4B7881461A6F11DD00DA59F2 /* Project object */ = {
205 | isa = PBXProject;
206 | attributes = {
207 | LastSwiftUpdateCheck = 0700;
208 | LastUpgradeCheck = 0700;
209 | ORGANIZATIONNAME = VSCO;
210 | TargetAttributes = {
211 | 4B78814D1A6F11DD00DA59F2 = {
212 | CreatedOnToolsVersion = 6.1.1;
213 | };
214 | 4B7881661A6F11DD00DA59F2 = {
215 | CreatedOnToolsVersion = 6.1.1;
216 | TestTargetID = 4B78814D1A6F11DD00DA59F2;
217 | };
218 | };
219 | };
220 | buildConfigurationList = 4B7881491A6F11DD00DA59F2 /* Build configuration list for PBXProject "VSCOSwiftBenchmarks" */;
221 | compatibilityVersion = "Xcode 3.2";
222 | developmentRegion = English;
223 | hasScannedForEncodings = 0;
224 | knownRegions = (
225 | en,
226 | Base,
227 | );
228 | mainGroup = 4B7881451A6F11DD00DA59F2;
229 | productRefGroup = 4B78814F1A6F11DD00DA59F2 /* Products */;
230 | projectDirPath = "";
231 | projectRoot = "";
232 | targets = (
233 | 4B78814D1A6F11DD00DA59F2 /* VSCOSwiftBenchmarks */,
234 | 4B7881661A6F11DD00DA59F2 /* VSCOSwiftBenchmarksTests */,
235 | );
236 | };
237 | /* End PBXProject section */
238 |
239 | /* Begin PBXResourcesBuildPhase section */
240 | 4B78814C1A6F11DD00DA59F2 /* Resources */ = {
241 | isa = PBXResourcesBuildPhase;
242 | buildActionMask = 2147483647;
243 | files = (
244 | 4B78815D1A6F11DD00DA59F2 /* Main.storyboard in Resources */,
245 | 4B7881621A6F11DD00DA59F2 /* LaunchScreen.xib in Resources */,
246 | 4B78815F1A6F11DD00DA59F2 /* Images.xcassets in Resources */,
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | 4B7881651A6F11DD00DA59F2 /* Resources */ = {
251 | isa = PBXResourcesBuildPhase;
252 | buildActionMask = 2147483647;
253 | files = (
254 | );
255 | runOnlyForDeploymentPostprocessing = 0;
256 | };
257 | /* End PBXResourcesBuildPhase section */
258 |
259 | /* Begin PBXSourcesBuildPhase section */
260 | 4B78814A1A6F11DD00DA59F2 /* Sources */ = {
261 | isa = PBXSourcesBuildPhase;
262 | buildActionMask = 2147483647;
263 | files = (
264 | 4B78815A1A6F11DD00DA59F2 /* ViewController.m in Sources */,
265 | 4B7881571A6F11DD00DA59F2 /* AppDelegate.m in Sources */,
266 | 4B7881541A6F11DD00DA59F2 /* main.m in Sources */,
267 | 4B7881791A6F11FA00DA59F2 /* ObjectiveCUtils.m in Sources */,
268 | 4B4856521A7479BE00043AE3 /* SwiftObject.swift in Sources */,
269 | 4B4856561A7479E800043AE3 /* ObjcObject.m in Sources */,
270 | 4B78817E1A6F122A00DA59F2 /* SwiftUtils.swift in Sources */,
271 | );
272 | runOnlyForDeploymentPostprocessing = 0;
273 | };
274 | 4B7881631A6F11DD00DA59F2 /* Sources */ = {
275 | isa = PBXSourcesBuildPhase;
276 | buildActionMask = 2147483647;
277 | files = (
278 | 4B4856571A7479E800043AE3 /* ObjcObject.m in Sources */,
279 | 4B78816E1A6F11DD00DA59F2 /* VSCOObjectiveCBenchmarksTests.m in Sources */,
280 | 4B78817A1A6F11FA00DA59F2 /* ObjectiveCUtils.m in Sources */,
281 | 4B7881811A6F132100DA59F2 /* VSCOSwiftBenchmarksTests.swift in Sources */,
282 | 4B78817F1A6F122A00DA59F2 /* SwiftUtils.swift in Sources */,
283 | 4B4856531A7479BE00043AE3 /* SwiftObject.swift in Sources */,
284 | );
285 | runOnlyForDeploymentPostprocessing = 0;
286 | };
287 | /* End PBXSourcesBuildPhase section */
288 |
289 | /* Begin PBXTargetDependency section */
290 | 4B7881691A6F11DD00DA59F2 /* PBXTargetDependency */ = {
291 | isa = PBXTargetDependency;
292 | target = 4B78814D1A6F11DD00DA59F2 /* VSCOSwiftBenchmarks */;
293 | targetProxy = 4B7881681A6F11DD00DA59F2 /* PBXContainerItemProxy */;
294 | };
295 | /* End PBXTargetDependency section */
296 |
297 | /* Begin PBXVariantGroup section */
298 | 4B78815B1A6F11DD00DA59F2 /* Main.storyboard */ = {
299 | isa = PBXVariantGroup;
300 | children = (
301 | 4B78815C1A6F11DD00DA59F2 /* Base */,
302 | );
303 | name = Main.storyboard;
304 | sourceTree = "";
305 | };
306 | 4B7881601A6F11DD00DA59F2 /* LaunchScreen.xib */ = {
307 | isa = PBXVariantGroup;
308 | children = (
309 | 4B7881611A6F11DD00DA59F2 /* Base */,
310 | );
311 | name = LaunchScreen.xib;
312 | sourceTree = "";
313 | };
314 | /* End PBXVariantGroup section */
315 |
316 | /* Begin XCBuildConfiguration section */
317 | 4B78816F1A6F11DD00DA59F2 /* Debug */ = {
318 | isa = XCBuildConfiguration;
319 | buildSettings = {
320 | ALWAYS_SEARCH_USER_PATHS = NO;
321 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
322 | CLANG_CXX_LIBRARY = "libc++";
323 | CLANG_ENABLE_MODULES = YES;
324 | CLANG_ENABLE_OBJC_ARC = YES;
325 | CLANG_WARN_BOOL_CONVERSION = YES;
326 | CLANG_WARN_CONSTANT_CONVERSION = YES;
327 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
328 | CLANG_WARN_EMPTY_BODY = YES;
329 | CLANG_WARN_ENUM_CONVERSION = YES;
330 | CLANG_WARN_INT_CONVERSION = YES;
331 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
332 | CLANG_WARN_UNREACHABLE_CODE = YES;
333 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
334 | CODE_SIGN_IDENTITY = "iPhone Developer: Fiel Guhit (Q4NV83VZP8)";
335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fiel Guhit (Q4NV83VZP8)";
336 | COPY_PHASE_STRIP = NO;
337 | ENABLE_STRICT_OBJC_MSGSEND = YES;
338 | ENABLE_TESTABILITY = YES;
339 | GCC_C_LANGUAGE_STANDARD = gnu99;
340 | GCC_DYNAMIC_NO_PIC = NO;
341 | GCC_OPTIMIZATION_LEVEL = fast;
342 | GCC_PREPROCESSOR_DEFINITIONS = (
343 | "DEBUG=1",
344 | "$(inherited)",
345 | );
346 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
349 | GCC_WARN_UNDECLARED_SELECTOR = YES;
350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
351 | GCC_WARN_UNUSED_FUNCTION = YES;
352 | GCC_WARN_UNUSED_VARIABLE = YES;
353 | IPHONEOS_DEPLOYMENT_TARGET = 8.1;
354 | MTL_ENABLE_DEBUG_INFO = YES;
355 | ONLY_ACTIVE_ARCH = YES;
356 | SDKROOT = iphoneos;
357 | TARGETED_DEVICE_FAMILY = "1,2";
358 | };
359 | name = Debug;
360 | };
361 | 4B7881701A6F11DD00DA59F2 /* Release */ = {
362 | isa = XCBuildConfiguration;
363 | buildSettings = {
364 | ALWAYS_SEARCH_USER_PATHS = NO;
365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
366 | CLANG_CXX_LIBRARY = "libc++";
367 | CLANG_ENABLE_MODULES = YES;
368 | CLANG_ENABLE_OBJC_ARC = YES;
369 | CLANG_WARN_BOOL_CONVERSION = YES;
370 | CLANG_WARN_CONSTANT_CONVERSION = YES;
371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
372 | CLANG_WARN_EMPTY_BODY = YES;
373 | CLANG_WARN_ENUM_CONVERSION = YES;
374 | CLANG_WARN_INT_CONVERSION = YES;
375 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
376 | CLANG_WARN_UNREACHABLE_CODE = YES;
377 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
378 | CODE_SIGN_IDENTITY = "iPhone Developer: Fiel Guhit (Q4NV83VZP8)";
379 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fiel Guhit (Q4NV83VZP8)";
380 | COPY_PHASE_STRIP = YES;
381 | ENABLE_NS_ASSERTIONS = NO;
382 | ENABLE_STRICT_OBJC_MSGSEND = YES;
383 | GCC_C_LANGUAGE_STANDARD = gnu99;
384 | GCC_OPTIMIZATION_LEVEL = fast;
385 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
386 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
387 | GCC_WARN_UNDECLARED_SELECTOR = YES;
388 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
389 | GCC_WARN_UNUSED_FUNCTION = YES;
390 | GCC_WARN_UNUSED_VARIABLE = YES;
391 | IPHONEOS_DEPLOYMENT_TARGET = 8.1;
392 | MTL_ENABLE_DEBUG_INFO = NO;
393 | ONLY_ACTIVE_ARCH = NO;
394 | SDKROOT = iphoneos;
395 | TARGETED_DEVICE_FAMILY = "1,2";
396 | VALIDATE_PRODUCT = YES;
397 | };
398 | name = Release;
399 | };
400 | 4B7881721A6F11DD00DA59F2 /* Debug */ = {
401 | isa = XCBuildConfiguration;
402 | buildSettings = {
403 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
404 | CLANG_ENABLE_MODULES = YES;
405 | INFOPLIST_FILE = VSCOSwiftBenchmarks/Info.plist;
406 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
407 | PRODUCT_BUNDLE_IDENTIFIER = "co.visualsupply.$(PRODUCT_NAME:rfc1034identifier)";
408 | PRODUCT_NAME = "$(TARGET_NAME)";
409 | SWIFT_OBJC_BRIDGING_HEADER = "VSCOSwiftBenchmarks/VSCOSwiftBenchmarks-Bridging-Header.h";
410 | SWIFT_OPTIMIZATION_LEVEL = "-O";
411 | };
412 | name = Debug;
413 | };
414 | 4B7881731A6F11DD00DA59F2 /* Release */ = {
415 | isa = XCBuildConfiguration;
416 | buildSettings = {
417 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
418 | CLANG_ENABLE_MODULES = YES;
419 | INFOPLIST_FILE = VSCOSwiftBenchmarks/Info.plist;
420 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
421 | PRODUCT_BUNDLE_IDENTIFIER = "co.visualsupply.$(PRODUCT_NAME:rfc1034identifier)";
422 | PRODUCT_NAME = "$(TARGET_NAME)";
423 | SWIFT_OBJC_BRIDGING_HEADER = "VSCOSwiftBenchmarks/VSCOSwiftBenchmarks-Bridging-Header.h";
424 | };
425 | name = Release;
426 | };
427 | 4B7881751A6F11DD00DA59F2 /* Debug */ = {
428 | isa = XCBuildConfiguration;
429 | buildSettings = {
430 | BUNDLE_LOADER = "$(TEST_HOST)";
431 | CLANG_ENABLE_MODULES = YES;
432 | FRAMEWORK_SEARCH_PATHS = (
433 | "$(SDKROOT)/Developer/Library/Frameworks",
434 | "$(inherited)",
435 | );
436 | GCC_PREPROCESSOR_DEFINITIONS = (
437 | "DEBUG=1",
438 | "$(inherited)",
439 | );
440 | INFOPLIST_FILE = VSCOSwiftBenchmarksTests/Info.plist;
441 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
442 | PRODUCT_BUNDLE_IDENTIFIER = "co.visualsupply.$(PRODUCT_NAME:rfc1034identifier)";
443 | PRODUCT_NAME = "$(TARGET_NAME)";
444 | SWIFT_OBJC_BRIDGING_HEADER = "VSCOSwiftBenchmarks/VSCOSwiftBenchmarks-Bridging-Header.h";
445 | SWIFT_OPTIMIZATION_LEVEL = "-O";
446 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VSCOSwiftBenchmarks.app/VSCOSwiftBenchmarks";
447 | };
448 | name = Debug;
449 | };
450 | 4B7881761A6F11DD00DA59F2 /* Release */ = {
451 | isa = XCBuildConfiguration;
452 | buildSettings = {
453 | BUNDLE_LOADER = "$(TEST_HOST)";
454 | CLANG_ENABLE_MODULES = YES;
455 | FRAMEWORK_SEARCH_PATHS = (
456 | "$(SDKROOT)/Developer/Library/Frameworks",
457 | "$(inherited)",
458 | );
459 | INFOPLIST_FILE = VSCOSwiftBenchmarksTests/Info.plist;
460 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
461 | PRODUCT_BUNDLE_IDENTIFIER = "co.visualsupply.$(PRODUCT_NAME:rfc1034identifier)";
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "VSCOSwiftBenchmarks/VSCOSwiftBenchmarks-Bridging-Header.h";
464 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VSCOSwiftBenchmarks.app/VSCOSwiftBenchmarks";
465 | };
466 | name = Release;
467 | };
468 | /* End XCBuildConfiguration section */
469 |
470 | /* Begin XCConfigurationList section */
471 | 4B7881491A6F11DD00DA59F2 /* Build configuration list for PBXProject "VSCOSwiftBenchmarks" */ = {
472 | isa = XCConfigurationList;
473 | buildConfigurations = (
474 | 4B78816F1A6F11DD00DA59F2 /* Debug */,
475 | 4B7881701A6F11DD00DA59F2 /* Release */,
476 | );
477 | defaultConfigurationIsVisible = 0;
478 | defaultConfigurationName = Release;
479 | };
480 | 4B7881711A6F11DD00DA59F2 /* Build configuration list for PBXNativeTarget "VSCOSwiftBenchmarks" */ = {
481 | isa = XCConfigurationList;
482 | buildConfigurations = (
483 | 4B7881721A6F11DD00DA59F2 /* Debug */,
484 | 4B7881731A6F11DD00DA59F2 /* Release */,
485 | );
486 | defaultConfigurationIsVisible = 0;
487 | defaultConfigurationName = Release;
488 | };
489 | 4B7881741A6F11DD00DA59F2 /* Build configuration list for PBXNativeTarget "VSCOSwiftBenchmarksTests" */ = {
490 | isa = XCConfigurationList;
491 | buildConfigurations = (
492 | 4B7881751A6F11DD00DA59F2 /* Debug */,
493 | 4B7881761A6F11DD00DA59F2 /* Release */,
494 | );
495 | defaultConfigurationIsVisible = 0;
496 | defaultConfigurationName = Release;
497 | };
498 | /* End XCConfigurationList section */
499 | };
500 | rootObject = 4B7881461A6F11DD00DA59F2 /* Project object */;
501 | }
502 |
--------------------------------------------------------------------------------