{"id":5882,"date":"2012-09-06T15:47:01","date_gmt":"2012-09-06T20:47:01","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=5882"},"modified":"2014-04-15T20:36:26","modified_gmt":"2014-04-16T00:36:26","slug":"block-based-dictionary-enumeration-can-be-pretty-slow","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2012\/09\/06\/block-based-dictionary-enumeration-can-be-pretty-slow\/","title":{"rendered":"Block-Based Dictionary Enumeration Can Be Pretty Slow"},"content":{"rendered":"<p>You&rsquo;d expect that <code>-[NSDictionary enumerateKeysAndObjectsUsingBlock:]<\/code> would be faster than fast-enumerating the keys and then looking up the objects, as it could access both at the same time while walking the hash table. However, <a href=\"http:\/\/www.mikeabdullah.net\/slow-block-based-dictionary-enumeration.html\">Mike Abdullah<\/a> found that it&rsquo;s actually much slower.<\/p>","protected":false},"excerpt":{"rendered":"<p>You&rsquo;d expect that -[NSDictionary enumerateKeysAndObjectsUsingBlock:] would be faster than fast-enumerating the keys and then looking up the objects, as it could access both at the same time while walking the hash table. However, Mike Abdullah found that it&rsquo;s actually much slower.<\/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":[168,69,860,54,71],"class_list":["post-5882","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-blocks","tag-cocoa","tag-nsdictionary","tag-objective-c","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/5882","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=5882"}],"version-history":[{"count":5,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/5882\/revisions"}],"predecessor-version":[{"id":8713,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/5882\/revisions\/8713"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=5882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=5882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=5882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}