{"id":40312,"date":"2023-08-10T15:44:02","date_gmt":"2023-08-10T19:44:02","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=40312"},"modified":"2023-08-28T09:35:58","modified_gmt":"2023-08-28T13:35:58","slug":"objective-c-internals","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/08\/10\/objective-c-internals\/","title":{"rendered":"Objective-C Internals"},"content":{"rendered":"<p><a href=\"https:\/\/alwaysprocessing.blog\/series\/objc-internals\">Brian T. Kelley<\/a> (via <a href=\"https:\/\/iosdevweekly.com\/issues\/621\">Dave Verwer<\/a>):<\/p>\n<blockquote cite=\"https:\/\/alwaysprocessing.blog\/series\/objc-internals\"><p>Get ready to dive deep into the inner workings of the Objective-C language and runtime! Each post delves into a specific aspect of the language and explores the details of its implementation. I hope you&rsquo;ll find this valuable to demystify the language, tackle tricky bugs, and optimize your code for performance.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/toot.community\/@justkwin\/110841684828987361\">Quinn<\/a>:<\/p>\n<blockquote cite=\"https:\/\/toot.community\/@justkwin\/110841684828987361\"><p>Highly recommended! Even if you lived through all this evolution, and spend way too much time staring at hex dumps in the debugger, you&rsquo;ll still learn something.<\/p><\/blockquote>\n\n<p id=\"objective-c-internals-update-2023-08-15\">Update (2023-08-15): See also: <a href=\"https:\/\/news.ycombinator.com\/item?id=37085604\">Hacker News<\/a>.<\/p>\n\n<p id=\"objective-c-internals-update-2023-08-28\">Update (2023-08-28): <a href=\"https:\/\/mastodon.social\/@numist@xoxo.zone\/110959302406441984\">Scott Perry<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@numist@xoxo.zone\/110959302406441984\"><p>wrt immortal objects in Python, I can&rsquo;t believe adding a conditional branch in the refcount code path didn&rsquo;t cause measurable performance issues; we got a big win when we moved the tag bit to the top of object pointers so we could use p&lt;=0 on the fast path to catch nil and tagged pointers in one shot.<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Brian T. Kelley (via Dave Verwer): Get ready to dive deep into the inner workings of the Objective-C language and runtime! Each post delves into a specific aspect of the language and explores the details of its implementation. I hope you&rsquo;ll find this valuable to demystify the language, tackle tricky bugs, and optimize your code [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-08-10T19:44:07Z","apple_news_api_id":"291ead62-9ad6-4414-bf56-1013c5d6517e","apple_news_api_modified_at":"2023-08-28T13:35:53Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAQ==","apple_news_api_share_url":"https:\/\/apple.news\/AKR6tYprWRBS_VhATxdZRfg","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":[46,54,760,138,71],"class_list":["post-40312","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-languagedesign","tag-objective-c","tag-objective-c-runtime","tag-optimization","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40312","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=40312"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40312\/revisions"}],"predecessor-version":[{"id":40459,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40312\/revisions\/40459"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=40312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=40312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=40312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}