├── README.md
├── AtomicBenchmark.xcodeproj
├── xcuserdata
│ └── vadymb.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── vadymb.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── IDEFindNavigatorScopes.plist
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── project.pbxproj
└── AtomicBenchmark
├── Types.swift
├── Locks.swift
├── ReportRenderer.swift
├── main.swift
├── GetterSetterBenchmark.swift
└── Samples.swift
/README.md:
--------------------------------------------------------------------------------
1 | # AtomicBenchmark
2 | Benchmarking atomic properties in Swift. See blog post for more details: http://www.vadimbulavin.com/benchmarking-locking-apis/
3 |
--------------------------------------------------------------------------------
/AtomicBenchmark.xcodeproj/xcuserdata/vadymb.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/AtomicBenchmark.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AtomicBenchmark.xcodeproj/project.xcworkspace/xcuserdata/vadymb.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/V8tr/AtomicBenchmark/HEAD/AtomicBenchmark.xcodeproj/project.xcworkspace/xcuserdata/vadymb.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/AtomicBenchmark.xcodeproj/project.xcworkspace/xcuserdata/vadymb.xcuserdatad/IDEFindNavigatorScopes.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/AtomicBenchmark.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/AtomicBenchmark.xcodeproj/xcuserdata/vadymb.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | AtomicBenchmark.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/AtomicBenchmark/Types.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Executer.swift
3 | // AtomicBenchmark
4 | //
5 | // Created by Vadym Bulavin on 6/29/18.
6 | // Copyright © 2018 Vadim Bulavin. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | struct Measurement {
12 | let iterations: Int
13 | let duration: TimeInterval
14 | let operation: String
15 | }
16 |
17 | struct Result {
18 | let measurements: [Measurement]
19 | let title: String
20 | }
21 |
22 | struct Report {
23 | var results: [Result]
24 |
25 | mutating func add(measurements: [Measurement], title: String) {
26 | let result = Result(measurements: measurements, title: title)
27 | results.append(result)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/AtomicBenchmark/Locks.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Locks.swift
3 | // AtomicBenchmark
4 | //
5 | // Created by Vadym Bulavin on 6/29/18.
6 | // Copyright © 2018 Vadim Bulavin. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | final class SpinLock {
12 | private var unfairLock = os_unfair_lock_s()
13 |
14 | func lock() {
15 | os_unfair_lock_lock(&unfairLock)
16 | }
17 |
18 | func unlock() {
19 | os_unfair_lock_unlock(&unfairLock)
20 | }
21 | }
22 |
23 | final class Mutex {
24 | private var mutex: pthread_mutex_t = {
25 | var mutex = pthread_mutex_t()
26 | pthread_mutex_init(&mutex, nil)
27 | return mutex
28 | }()
29 |
30 | func lock() {
31 | pthread_mutex_lock(&mutex)
32 | }
33 |
34 | func unlock() {
35 | pthread_mutex_unlock(&mutex)
36 | }
37 | }
38 |
39 | final class ReadWriteLock {
40 | private var rwlock: pthread_rwlock_t = {
41 | var rwlock = pthread_rwlock_t()
42 | pthread_rwlock_init(&rwlock, nil)
43 | return rwlock
44 | }()
45 |
46 | func lock() {
47 | pthread_rwlock_wrlock(&rwlock)
48 | }
49 |
50 | func unlock() {
51 | pthread_rwlock_unlock(&rwlock)
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/AtomicBenchmark/ReportRenderer.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ReportRenderer.swift
3 | // AtomicBenchmark
4 | //
5 | // Created by Vadym Bulavin on 6/29/18.
6 | // Copyright © 2018 Vadim Bulavin. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | struct ReportRenderer {
12 | let report: Report
13 |
14 | func render() {
15 | for result in report.results {
16 | print("***** \(result.title) *****")
17 | for measurement in result.measurements {
18 | print("\(measurement.operation): \(measurement.iterations) iterations completed in \(measurement.duration)s")
19 | }
20 | print("\n")
21 | }
22 | }
23 | }
24 |
25 | struct CSVReportRenderer {
26 | let report: Report
27 | let fileName: String
28 |
29 | func render() {
30 | guard let path = FileManager.default.urls(for: .desktopDirectory, in: .allDomainsMask).first?.appendingPathComponent(fileName) else {
31 | fatalError()
32 | }
33 |
34 | var content = ""
35 | content += "Operation,Number of iterations,Duration in seconds\n"
36 |
37 | for result in report.results {
38 | content += "\(result.title)\n"
39 | for measurement in result.measurements {
40 | content += "\(measurement.operation),\(measurement.iterations),\(measurement.duration)\n"
41 | }
42 | content += "\n"
43 | }
44 |
45 | try! content.write(to: path, atomically: true, encoding: .utf8)
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/AtomicBenchmark/main.swift:
--------------------------------------------------------------------------------
1 | //
2 | // main.swift
3 | // AtomicBenchmark
4 | //
5 | // Created by Vadym Bulavin on 6/29/18.
6 | // Copyright © 2018 Vadim Bulavin. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | let lock = NSLock()
12 | let nsLockSample = LockSample(title: "Lock", lock: lock.lock, unlock: lock.unlock)
13 |
14 | let mutex = Mutex()
15 | let mutexSample = LockSample(title: "Mutex", lock: mutex.lock, unlock: mutex.unlock)
16 |
17 | let spinLock = SpinLock()
18 | let spinLockSample = LockSample(title: "Spin Lock", lock: spinLock.lock, unlock: spinLock.unlock)
19 |
20 | let rwLock = ReadWriteLock()
21 | let rwLockSample = LockSample(title: "Read Write Lock", lock: rwLock.lock, unlock: rwLock.unlock)
22 |
23 | let dispatchQueueSample = DispatchQueueSample()
24 |
25 | let operationsQueueSample = OperationsQueueSample()
26 |
27 | let samples: [Sample] = [
28 | nsLockSample,
29 | mutexSample,
30 | spinLockSample,
31 | rwLockSample,
32 | dispatchQueueSample,
33 | operationsQueueSample
34 | ]
35 |
36 | let iterations = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16_384, 32_768, 65_536, 131_072, 262_144, 524_288, 1_048_576]
37 | let executer = GetterSetterBenchmark(settings: .init(attemptsPerIteration: 100, iterationsPerSample: iterations))
38 | let results = samples.map(executer.measure)
39 | let report = Report(results: results)
40 | ReportRenderer(report: report).render()
41 | CSVReportRenderer(report: report, fileName: "Benchmark.csv").render()
42 |
--------------------------------------------------------------------------------
/AtomicBenchmark/GetterSetterBenchmark.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GetterSetterBenchmark.swift
3 | // AtomicBenchmark
4 | //
5 | // Created by Vadym Bulavin on 6/29/18.
6 | // Copyright © 2018 Vadim Bulavin. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | struct GetterSetterBenchmark {
12 | struct Settings {
13 | let attemptsPerIteration: Int
14 | let iterationsPerSample: [Int]
15 | }
16 |
17 | let settings: Settings
18 |
19 | func measure(sample: Sample) -> Result {
20 | print("Start \(sample)")
21 |
22 | var sample = sample
23 |
24 | let getterMeasurements = settings.iterationsPerSample.map {
25 | self.makeMeasurement(operation: "Getter", numberOfIterations: $0) { _ in
26 | _ = sample.foo
27 | }
28 | }
29 |
30 | let setterMeasurements = settings.iterationsPerSample.map {
31 | self.makeMeasurement(operation: "Setter", numberOfIterations: $0) { i in
32 | sample.foo = i
33 | }
34 | }
35 |
36 | return Result(measurements: getterMeasurements + setterMeasurements, title: sample.title)
37 | }
38 |
39 | private func makeMeasurement(operation: String, numberOfIterations: Int, block: (Int) -> Void) -> Measurement {
40 | let duration = averageBenchmark(iterations: numberOfIterations, numberOfAttempts: settings.attemptsPerIteration, block: block)
41 | return Measurement(iterations: numberOfIterations, duration: duration, operation: operation)
42 | }
43 |
44 | private func benchmark(block: () -> Void) -> TimeInterval {
45 | let startTime = CFAbsoluteTimeGetCurrent()
46 | block()
47 | let endTime = CFAbsoluteTimeGetCurrent()
48 | let totalTime = endTime - startTime
49 | return totalTime
50 | }
51 |
52 | private func averageBenchmark(iterations: Int, numberOfAttempts: Int, block: (Int) -> Void) -> TimeInterval {
53 | var accumulatedResult: TimeInterval = 0
54 |
55 | for _ in 0.. Void
18 | private let unlock: () -> Void
19 | let title: String
20 |
21 | init(title: String, lock: @escaping () -> Void, unlock: @escaping () -> Void) {
22 | self.lock = lock
23 | self.unlock = unlock
24 | self.title = title
25 | }
26 |
27 | private var underlyingFoo = 0
28 |
29 | var foo: Int {
30 | get {
31 | lock()
32 | let value = underlyingFoo
33 | unlock()
34 | return value
35 | }
36 | set {
37 | lock()
38 | underlyingFoo = newValue
39 | unlock()
40 | }
41 | }
42 | }
43 |
44 | extension LockSample: Sample {}
45 |
46 | class DispatchQueueSample {
47 | private let queue = DispatchQueue(label: "com.vadimbulavin.DispatchQueueSample")
48 | private var underlyingFoo = 0
49 |
50 | var foo: Int {
51 | get {
52 | return queue.sync { underlyingFoo }
53 | }
54 | set {
55 | queue.sync {
56 | self.underlyingFoo = newValue
57 | }
58 | }
59 | }
60 | }
61 |
62 | extension DispatchQueueSample: Sample {
63 | var title: String {
64 | return "Dispatch Queue"
65 | }
66 | }
67 |
68 | class OperationsQueueSample {
69 | private let queue: OperationQueue = {
70 | var q = OperationQueue()
71 | q.maxConcurrentOperationCount = 1
72 | return q
73 | }()
74 | private var underlyingFoo = 0
75 |
76 | var foo: Int {
77 | get {
78 | var foo: Int!
79 | execute(on: queue) { [underlyingFoo] in
80 | foo = underlyingFoo
81 | }
82 | return foo
83 | }
84 | set {
85 | execute(on: queue) {
86 | self.underlyingFoo = newValue
87 | }
88 | }
89 | }
90 |
91 | private func execute(on q: OperationQueue, block: @escaping () -> Void) {
92 | let op = BlockOperation(block: block)
93 | q.addOperation(op)
94 | op.waitUntilFinished()
95 | }
96 | }
97 |
98 | extension OperationsQueueSample: Sample {
99 | var title: String {
100 | return "Operations Queue"
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/AtomicBenchmark.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | D7DC644120E653E900171A54 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DC644020E653E900171A54 /* main.swift */; };
11 | D7DC644C20E6798300171A54 /* Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DC644B20E6798300171A54 /* Types.swift */; };
12 | D7DC644E20E679C000171A54 /* Locks.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DC644D20E679C000171A54 /* Locks.swift */; };
13 | D7DC645020E67A0D00171A54 /* GetterSetterBenchmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DC644F20E67A0D00171A54 /* GetterSetterBenchmark.swift */; };
14 | D7DC645220E67C6900171A54 /* Samples.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DC645120E67C6900171A54 /* Samples.swift */; };
15 | D7DC645420E67EDF00171A54 /* ReportRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DC645320E67EDF00171A54 /* ReportRenderer.swift */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | D7DC643B20E653E900171A54 /* CopyFiles */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = /usr/share/man/man1/;
23 | dstSubfolderSpec = 0;
24 | files = (
25 | );
26 | runOnlyForDeploymentPostprocessing = 1;
27 | };
28 | /* End PBXCopyFilesBuildPhase section */
29 |
30 | /* Begin PBXFileReference section */
31 | D7DC643D20E653E900171A54 /* AtomicBenchmark */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = AtomicBenchmark; sourceTree = BUILT_PRODUCTS_DIR; };
32 | D7DC644020E653E900171A54 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; };
33 | D7DC644B20E6798300171A54 /* Types.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Types.swift; sourceTree = ""; };
34 | D7DC644D20E679C000171A54 /* Locks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Locks.swift; sourceTree = ""; };
35 | D7DC644F20E67A0D00171A54 /* GetterSetterBenchmark.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetterSetterBenchmark.swift; sourceTree = ""; };
36 | D7DC645120E67C6900171A54 /* Samples.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Samples.swift; sourceTree = ""; };
37 | D7DC645320E67EDF00171A54 /* ReportRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportRenderer.swift; sourceTree = ""; };
38 | /* End PBXFileReference section */
39 |
40 | /* Begin PBXFrameworksBuildPhase section */
41 | D7DC643A20E653E900171A54 /* Frameworks */ = {
42 | isa = PBXFrameworksBuildPhase;
43 | buildActionMask = 2147483647;
44 | files = (
45 | );
46 | runOnlyForDeploymentPostprocessing = 0;
47 | };
48 | /* End PBXFrameworksBuildPhase section */
49 |
50 | /* Begin PBXGroup section */
51 | D7DC643420E653E900171A54 = {
52 | isa = PBXGroup;
53 | children = (
54 | D7DC643F20E653E900171A54 /* AtomicBenchmark */,
55 | D7DC643E20E653E900171A54 /* Products */,
56 | );
57 | sourceTree = "";
58 | };
59 | D7DC643E20E653E900171A54 /* Products */ = {
60 | isa = PBXGroup;
61 | children = (
62 | D7DC643D20E653E900171A54 /* AtomicBenchmark */,
63 | );
64 | name = Products;
65 | sourceTree = "";
66 | };
67 | D7DC643F20E653E900171A54 /* AtomicBenchmark */ = {
68 | isa = PBXGroup;
69 | children = (
70 | D7DC644F20E67A0D00171A54 /* GetterSetterBenchmark.swift */,
71 | D7DC644D20E679C000171A54 /* Locks.swift */,
72 | D7DC644020E653E900171A54 /* main.swift */,
73 | D7DC645320E67EDF00171A54 /* ReportRenderer.swift */,
74 | D7DC645120E67C6900171A54 /* Samples.swift */,
75 | D7DC644B20E6798300171A54 /* Types.swift */,
76 | );
77 | path = AtomicBenchmark;
78 | sourceTree = "";
79 | };
80 | /* End PBXGroup section */
81 |
82 | /* Begin PBXNativeTarget section */
83 | D7DC643C20E653E900171A54 /* AtomicBenchmark */ = {
84 | isa = PBXNativeTarget;
85 | buildConfigurationList = D7DC644420E653E900171A54 /* Build configuration list for PBXNativeTarget "AtomicBenchmark" */;
86 | buildPhases = (
87 | D7DC643920E653E900171A54 /* Sources */,
88 | D7DC643A20E653E900171A54 /* Frameworks */,
89 | D7DC643B20E653E900171A54 /* CopyFiles */,
90 | );
91 | buildRules = (
92 | );
93 | dependencies = (
94 | );
95 | name = AtomicBenchmark;
96 | productName = AtomicBenchmark;
97 | productReference = D7DC643D20E653E900171A54 /* AtomicBenchmark */;
98 | productType = "com.apple.product-type.tool";
99 | };
100 | /* End PBXNativeTarget section */
101 |
102 | /* Begin PBXProject section */
103 | D7DC643520E653E900171A54 /* Project object */ = {
104 | isa = PBXProject;
105 | attributes = {
106 | LastSwiftUpdateCheck = 0940;
107 | LastUpgradeCheck = 0940;
108 | ORGANIZATIONNAME = "Vadim Bulavin";
109 | TargetAttributes = {
110 | D7DC643C20E653E900171A54 = {
111 | CreatedOnToolsVersion = 9.4.1;
112 | };
113 | };
114 | };
115 | buildConfigurationList = D7DC643820E653E900171A54 /* Build configuration list for PBXProject "AtomicBenchmark" */;
116 | compatibilityVersion = "Xcode 9.3";
117 | developmentRegion = en;
118 | hasScannedForEncodings = 0;
119 | knownRegions = (
120 | en,
121 | );
122 | mainGroup = D7DC643420E653E900171A54;
123 | productRefGroup = D7DC643E20E653E900171A54 /* Products */;
124 | projectDirPath = "";
125 | projectRoot = "";
126 | targets = (
127 | D7DC643C20E653E900171A54 /* AtomicBenchmark */,
128 | );
129 | };
130 | /* End PBXProject section */
131 |
132 | /* Begin PBXSourcesBuildPhase section */
133 | D7DC643920E653E900171A54 /* Sources */ = {
134 | isa = PBXSourcesBuildPhase;
135 | buildActionMask = 2147483647;
136 | files = (
137 | D7DC644120E653E900171A54 /* main.swift in Sources */,
138 | D7DC645220E67C6900171A54 /* Samples.swift in Sources */,
139 | D7DC645420E67EDF00171A54 /* ReportRenderer.swift in Sources */,
140 | D7DC645020E67A0D00171A54 /* GetterSetterBenchmark.swift in Sources */,
141 | D7DC644E20E679C000171A54 /* Locks.swift in Sources */,
142 | D7DC644C20E6798300171A54 /* Types.swift in Sources */,
143 | );
144 | runOnlyForDeploymentPostprocessing = 0;
145 | };
146 | /* End PBXSourcesBuildPhase section */
147 |
148 | /* Begin XCBuildConfiguration section */
149 | D7DC644220E653E900171A54 /* Debug */ = {
150 | isa = XCBuildConfiguration;
151 | buildSettings = {
152 | ALWAYS_SEARCH_USER_PATHS = NO;
153 | CLANG_ANALYZER_NONNULL = YES;
154 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
155 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
156 | CLANG_CXX_LIBRARY = "libc++";
157 | CLANG_ENABLE_MODULES = YES;
158 | CLANG_ENABLE_OBJC_ARC = YES;
159 | CLANG_ENABLE_OBJC_WEAK = YES;
160 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
161 | CLANG_WARN_BOOL_CONVERSION = YES;
162 | CLANG_WARN_COMMA = YES;
163 | CLANG_WARN_CONSTANT_CONVERSION = YES;
164 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
165 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
166 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
167 | CLANG_WARN_EMPTY_BODY = YES;
168 | CLANG_WARN_ENUM_CONVERSION = YES;
169 | CLANG_WARN_INFINITE_RECURSION = YES;
170 | CLANG_WARN_INT_CONVERSION = YES;
171 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
172 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
173 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
174 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
175 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
176 | CLANG_WARN_STRICT_PROTOTYPES = YES;
177 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
178 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
179 | CLANG_WARN_UNREACHABLE_CODE = YES;
180 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
181 | CODE_SIGN_IDENTITY = "-";
182 | COPY_PHASE_STRIP = NO;
183 | DEBUG_INFORMATION_FORMAT = dwarf;
184 | ENABLE_STRICT_OBJC_MSGSEND = YES;
185 | ENABLE_TESTABILITY = YES;
186 | GCC_C_LANGUAGE_STANDARD = gnu11;
187 | GCC_DYNAMIC_NO_PIC = NO;
188 | GCC_NO_COMMON_BLOCKS = YES;
189 | GCC_OPTIMIZATION_LEVEL = 0;
190 | GCC_PREPROCESSOR_DEFINITIONS = (
191 | "DEBUG=1",
192 | "$(inherited)",
193 | );
194 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
195 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
196 | GCC_WARN_UNDECLARED_SELECTOR = YES;
197 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
198 | GCC_WARN_UNUSED_FUNCTION = YES;
199 | GCC_WARN_UNUSED_VARIABLE = YES;
200 | MACOSX_DEPLOYMENT_TARGET = 10.13;
201 | MTL_ENABLE_DEBUG_INFO = YES;
202 | ONLY_ACTIVE_ARCH = YES;
203 | SDKROOT = macosx;
204 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
205 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
206 | };
207 | name = Debug;
208 | };
209 | D7DC644320E653E900171A54 /* Release */ = {
210 | isa = XCBuildConfiguration;
211 | buildSettings = {
212 | ALWAYS_SEARCH_USER_PATHS = NO;
213 | CLANG_ANALYZER_NONNULL = YES;
214 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
215 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
216 | CLANG_CXX_LIBRARY = "libc++";
217 | CLANG_ENABLE_MODULES = YES;
218 | CLANG_ENABLE_OBJC_ARC = YES;
219 | CLANG_ENABLE_OBJC_WEAK = YES;
220 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
221 | CLANG_WARN_BOOL_CONVERSION = YES;
222 | CLANG_WARN_COMMA = YES;
223 | CLANG_WARN_CONSTANT_CONVERSION = YES;
224 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
225 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
226 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
227 | CLANG_WARN_EMPTY_BODY = YES;
228 | CLANG_WARN_ENUM_CONVERSION = YES;
229 | CLANG_WARN_INFINITE_RECURSION = YES;
230 | CLANG_WARN_INT_CONVERSION = YES;
231 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
232 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
233 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
234 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
235 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
236 | CLANG_WARN_STRICT_PROTOTYPES = YES;
237 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
238 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
239 | CLANG_WARN_UNREACHABLE_CODE = YES;
240 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
241 | CODE_SIGN_IDENTITY = "-";
242 | COPY_PHASE_STRIP = NO;
243 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
244 | ENABLE_NS_ASSERTIONS = NO;
245 | ENABLE_STRICT_OBJC_MSGSEND = YES;
246 | GCC_C_LANGUAGE_STANDARD = gnu11;
247 | GCC_NO_COMMON_BLOCKS = YES;
248 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
249 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
250 | GCC_WARN_UNDECLARED_SELECTOR = YES;
251 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
252 | GCC_WARN_UNUSED_FUNCTION = YES;
253 | GCC_WARN_UNUSED_VARIABLE = YES;
254 | MACOSX_DEPLOYMENT_TARGET = 10.13;
255 | MTL_ENABLE_DEBUG_INFO = NO;
256 | SDKROOT = macosx;
257 | SWIFT_COMPILATION_MODE = wholemodule;
258 | SWIFT_OPTIMIZATION_LEVEL = "-O";
259 | };
260 | name = Release;
261 | };
262 | D7DC644520E653E900171A54 /* Debug */ = {
263 | isa = XCBuildConfiguration;
264 | buildSettings = {
265 | CODE_SIGN_STYLE = Automatic;
266 | PRODUCT_NAME = "$(TARGET_NAME)";
267 | SWIFT_VERSION = 4.0;
268 | };
269 | name = Debug;
270 | };
271 | D7DC644620E653E900171A54 /* Release */ = {
272 | isa = XCBuildConfiguration;
273 | buildSettings = {
274 | CODE_SIGN_STYLE = Automatic;
275 | PRODUCT_NAME = "$(TARGET_NAME)";
276 | SWIFT_VERSION = 4.0;
277 | };
278 | name = Release;
279 | };
280 | /* End XCBuildConfiguration section */
281 |
282 | /* Begin XCConfigurationList section */
283 | D7DC643820E653E900171A54 /* Build configuration list for PBXProject "AtomicBenchmark" */ = {
284 | isa = XCConfigurationList;
285 | buildConfigurations = (
286 | D7DC644220E653E900171A54 /* Debug */,
287 | D7DC644320E653E900171A54 /* Release */,
288 | );
289 | defaultConfigurationIsVisible = 0;
290 | defaultConfigurationName = Release;
291 | };
292 | D7DC644420E653E900171A54 /* Build configuration list for PBXNativeTarget "AtomicBenchmark" */ = {
293 | isa = XCConfigurationList;
294 | buildConfigurations = (
295 | D7DC644520E653E900171A54 /* Debug */,
296 | D7DC644620E653E900171A54 /* Release */,
297 | );
298 | defaultConfigurationIsVisible = 0;
299 | defaultConfigurationName = Release;
300 | };
301 | /* End XCConfigurationList section */
302 | };
303 | rootObject = D7DC643520E653E900171A54 /* Project object */;
304 | }
305 |
--------------------------------------------------------------------------------