{"id":9063,"date":"2014-06-28T20:54:36","date_gmt":"2014-06-29T00:54:36","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=9063"},"modified":"2014-06-28T20:54:36","modified_gmt":"2014-06-29T00:54:36","slug":"compiler-writers-gone-wild-arc-madness","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2014\/06\/28\/compiler-writers-gone-wild-arc-madness\/","title":{"rendered":"Compiler Writers Gone Wild: ARC Madness"},"content":{"rendered":"<p><a href=\"http:\/\/blog.metaobject.com\/2014\/06\/compiler-writers-gone-wild-arc-madness.html\">Marcel Weiher<\/a>:<\/p>\n<blockquote cite=\"http:\/\/blog.metaobject.com\/2014\/06\/compiler-writers-gone-wild-arc-madness.html\">\n<p>When they turned to me, I was also initially puzzled, because all this should\ndo on x86 is stuff a zero into %eax and return.  <em>This cannot possibly crash<\/em>,\nso everyone just assumed that the stack traces were off, as they frequently are.<\/p>\n<p>[&#8230;]<\/p>\n<p>Fortunately I had just looked at the project settings and noticed that we were compiling\nwith -O0, so optimizations disabled, and my suspicion was that ARC was doing some \nunnecessary retaining.  That suspicion turned out to be on the money, <code>otool -Vt<\/code> revealed that\nARC had turned our innocuous <code>return NO;<\/code> into the following monstrosity.<\/p>\n<\/blockquote>\n<p>I think you pretty much have to use the optimizer when using ARC. Otherwise, in normal use the code is really slow, and when debugging it&rsquo;s so different from the normal code that you will be checking different things.<\/p>","protected":false},"excerpt":{"rendered":"<p>Marcel Weiher: When they turned to me, I was also initially puzzled, because all this should do on x86 is stuff a zero into %eax and return. This cannot possibly crash, so everyone just assumed that the stack traces were off, as they frequently are. [&#8230;] Fortunately I had just looked at the project settings [&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":[55,56,571,54,138,71],"class_list":["post-9063","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-arc","tag-debugging","tag-memory-management","tag-objective-c","tag-optimization","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9063","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=9063"}],"version-history":[{"count":0,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/9063\/revisions"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=9063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=9063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=9063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}