{"id":117,"date":"2008-08-24T20:18:32","date_gmt":"2008-08-25T01:18:32","guid":{"rendered":"http:\/\/alarmingdevelopment.org\/?p=117"},"modified":"2008-08-26T13:32:09","modified_gmt":"2008-08-26T18:32:09","slug":"too-many-cores-not-enough-brains","status":"publish","type":"post","link":"https:\/\/alarmingdevelopment.org\/?p=117","title":{"rendered":"Too many cores, not enough brains"},"content":{"rendered":"<p>A number of comments on my <a href=\"http:\/\/alarmingdevelopment.org\/?p=96\">last post<\/a> suggested I work on multi-core parallelism. There are a number of reasons why I am steering clear of that topic. <!--more--><\/p>\n<p>First of all, it seems everyone is doing it, and I hate crowds. Secondly, I was heavily involved in the early days of multithreading and transactions back in the 70&#8217;s and 80&#8217;s. Been there, done that, got the Lucite trophy.<\/p>\n<p>More importantly, I believe the whole movement is misguided. Remember that we already know how to exploit multicore processors: with now-standard multithreading techniques. Multithreaded programming is notoriously difficult and error-prone, so the challenge is to invent techniques that will make it easier. But I just don&#8217;t see vast hordes of programmers needing to do multithreaded programming, and I don&#8217;t see large application domains where it is needed. Internet server apps are architected to scale across a CPU farm far beyond the limits of multicore. Likewise CGI rendering farms. Desktop apps don&#8217;t really need more CPU cycles: they just absorb them in lieu of performance tuning. It is mostly specialized performance-intensive domains that are truly in need of multithreading: like OS kernels and database engines and video codecs. Such code will continue to be written in C no matter what. <\/p>\n<p>There are only two groups that want multicore. One is the computer hardware industry, which has become addicted to rapid obsolescence, and whose sales will fall if computers start lasting more than a few years. The other group is researchers looking for a topic. Multicore programming is an irresistible bait for researchers: it is a hard puzzle, with quantifiable results, and a shot at changing the world. Unfortunately it is turning out that there is little quantifiable difference between the plethora of alternatives, leaving it as a matter of subjective judgment, which they hate. I already see signs that the multicore research frenzy has peaked.<\/p>\n<p>That said, Subtext does suggest a transactional model of computation related to some of the recent research. But parallelism is just a possible side-benefit. The point is to allow the programmer to express their intent without having to mentally compile a linear execution schedule. <strong>Performance is not the problem.<\/strong> Write that on the board 100 times.<\/p>\n<hr \/>\n<p>Update: It looks like I really stepped in it this time, so let me clarify my position.<\/p>\n<p>Giving a multicore CPU to a programmer is like giving a drink to an alcoholic. Saint Knuth taught us that premature optimization is the root of all evil. I&#8217;m here to tell you that virtually all of programming is premature optimization. Once, just once, try to write a program without ever thinking about performance. I know I can&#8217;t. We have this fatal attraction to performance problems: they are just so shiny and clear-cut: a chance to be clever with a well-defined problem. The other issues we grapple with in programming are so vague and ambiguous and ultimately unknowable. But those are the essential issues, and thinking about performance is a distraction from them. <\/p>\n<p>Inventing new programming languages and techniques to get better performance on multicore chips goes completely in the wrong direction. We should be figuring out how we could improve programming given unbounded performance. Then figure out how to optimize it. I have come to believe that our programming languages and design patterns are all a giant case of premature optimization. So maybe we need multicore, and maybe we need to complicate programming as a result, but it is just digging ourselves deeper into the hole we&#8217;re in, and should not be celebrated. <\/p>\n<hr \/>\n<p>Update: see rebuttal in <a href=\"http:\/\/alarmingdevelopment.org\/?p=136\">next post<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A number of comments on my last post suggested I work on multi-core parallelism. There are a number of reasons why I am steering clear of that topic.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2,1],"tags":[],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-agitprop","category-general"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pfEnU-1T","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=117"}],"version-history":[{"count":19,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":131,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions\/131"}],"wp:attachment":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}