{"id":14388,"date":"2016-05-06T10:50:18","date_gmt":"2016-05-06T14:50:18","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=14388"},"modified":"2016-05-06T10:50:18","modified_gmt":"2016-05-06T14:50:18","slug":"a-tale-of-two-optimizers","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/05\/06\/a-tale-of-two-optimizers\/","title":{"rendered":"A Tale of Two Optimizers"},"content":{"rendered":"<p><a href=\"http:\/\/indiestack.com\/2016\/05\/a-tale-of-two-optimizers\/\">Daniel Jalkut<\/a>:<\/p>\n<blockquote cite=\"http:\/\/indiestack.com\/2016\/05\/a-tale-of-two-optimizers\/\">\n<p>Today, Apple got back to me with a followup, suggesting rather gently that I may have neglected to disable optimization in my target. Rookie move! The kind of behavior I was seeing in the debugger is exactly what happens when lldb can&rsquo;t make as much sense of your code because of inlined functions, loops that have been restructured, etc.<\/p>\n<p>In fact, I had correlated the symptoms with such a problem, but when I went to check on the status of my optimization settings, everything looked fine.<\/p>\n<p>[&#8230;]<\/p>\n<p>So why does debugging Swift fail so hard for me? Because <em>Swift doesn&rsquo;t use that optimization setting<\/em>.<\/p>\n<\/blockquote>\n<p>It uses <code>SWIFT_OPTIMIZATION_LEVEL<\/code> instead of <code>GCC_OPTIMIZATION_LEVEL<\/code>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Daniel Jalkut: Today, Apple got back to me with a followup, suggesting rather gently that I may have neglected to disable optimization in my target. Rookie move! The kind of behavior I was seeing in the debugger is exactly what happens when lldb can&rsquo;t make as much sense of your code because of inlined functions, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[255,56,31,317,30,71,901,226],"class_list":["post-14388","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-compiler","tag-debugging","tag-ios","tag-lldb","tag-mac","tag-programming","tag-swift-programming-language","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=14388"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14388\/revisions"}],"predecessor-version":[{"id":14389,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/14388\/revisions\/14389"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=14388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=14388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=14388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}