Recently we had some issues with getting readable stack traces on crash logs when using app center. We did not have the function that produced a crash (with a fatalError() inside) in the actual stack trace. We tried several different approaches and the only change in the project that resulted in more readable crash logs was to change the Swift Compiler - Code Generation , optimization level from -O to -Osize. That change solves the crash logs and gives us a bit more readable stack traces but are we paying a huge cost for doing that?
My question is, how much of a performance impact would we expect if we do not use the recommended -O optimization level and use -Osize instead. I've read the swift blog post where this option was introduced in Swift 4.1 but I am still unaware of the consequences performance wise. Our code base is entirely in Swift and we have several in-house dependencies that are dynamic frameworks which are also in Swift.