We have seen that using
-Osizereduces code size from 5% to even 30% for some projects.But what about performance? This completely depends on the project. For most applications the performance hit with
-Osizewill be negligible, i.e. below 5%. But for performance sensitive code-Omight still be the better choice.[…]
But in contrast to
-O, the compiler tries to avoid code duplication. For example, when inlining functions the compiler uses a lower size limit to decide whether a function should be inlined.
CompilerOptimizationProgrammingSwift Programming Language
[…] Previously: Swift 4: Synthesizing Equatable and Hashable Conformance, Swift 4.1 Conditional Conformance Is Amazing, Code Size Optimization Mode in Swift 4.1. […]
Black Friday
Blog
Archives
Tag Cloud
Top Posts
Recently Updated
RSS Feed ·Comments
Mastodon ·Twitter
Apple News
Trackback
Support this site viaPatreon.
Try my Mac apps: