{"id":40493,"date":"2023-08-30T15:51:54","date_gmt":"2023-08-30T19:51:54","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=40493"},"modified":"2023-08-30T15:51:54","modified_gmt":"2023-08-30T19:51:54","slug":"premature-optimization-universally-misunderstood","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/08\/30\/premature-optimization-universally-misunderstood\/","title":{"rendered":"Premature Optimization: Universally Misunderstood"},"content":{"rendered":"<p><a href=\"https:\/\/milen.me\/writings\/premature-optimization-universally-misunderstood\/\">Milen Dzhumerov<\/a> (<a href=\"https:\/\/mastodon.social\/@milend\/110968596573831449\">Mastodon<\/a>):<\/p>\n<blockquote cite=\"https:\/\/milen.me\/writings\/premature-optimization-universally-misunderstood\/\">\n<p>It has been commonly interpreted as &ldquo;don&rsquo;t think about performance in the beginning,\nyou can fix any performance problem later&rdquo;. This interpretation is <em>completely and categorically wrong<\/em>.<\/p>\n<p>[&#8230;]<\/p>\n<p>With the additional context, the quote takes on a significantly\ndifferent meaning: it&rsquo;s making a statement only about <em>micro<\/em>-optimisations\n(\"<em>small efficiencies<\/em>\"), <em>not<\/em> about performance in general.<\/p>\n<p>Hoare was simply advising against micro-optimisations without finding the hotspots first: the &ldquo;premature&rdquo; part refers to lacking measurements.<\/p>\n<p>[&#8230;]<\/p>\n<p>As tech stack fundamentals, access patterns, data dependencies and data structures are baked into a design, it&rsquo;s not possible to hotspot your way out of a slow architecture.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2014\/03\/20\/introducing-the-hack-programming-language\/\">Introducing the Hack Programming Language<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2007\/08\/27\/cocoa-microbenchmarks\/\">Cocoa Microbenchmarks<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2003\/04\/25\/quote_of_the_day\/\">Quote of the Day<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Milen Dzhumerov (Mastodon): It has been commonly interpreted as &ldquo;don&rsquo;t think about performance in the beginning, you can fix any performance problem later&rdquo;. This interpretation is completely and categorically wrong. [&#8230;] With the additional context, the quote takes on a significantly different meaning: it&rsquo;s making a statement only about micro-optimisations (\"small efficiencies\"), not about performance [&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-30T19:51:57Z","apple_news_api_id":"44753b82-f283-4df7-898b-5e9a0b238041","apple_news_api_modified_at":"2023-08-30T19:51:57Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/ARHU7gvKDTfeJi16aCyOAQQ","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":[27,138,71],"class_list":["post-40493","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-craft","tag-optimization","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40493","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=40493"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40493\/revisions"}],"predecessor-version":[{"id":40494,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40493\/revisions\/40494"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=40493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=40493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=40493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}