TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Two Performance Walls Approaching (2009)

31 点作者 brassybadger超过 9 年前

8 条评论

trsohmers超过 9 年前
One should also look at Gustafson&#x27;s Law [0], which is kind of a foil to Amdahl&#x27;s law. While the serial portion of a program can not necessarily be parallelized, who cares if the parallelizable part is what continues to grow in size year over year?<p>Take this example: If you are a video rendering house, and do all of your work during the day and render at night (for say, 8 hours) you can get &#x27;x&#x27; amount of polygons rendered (or whatever other metric). If for your next movie, say you want to have twice the number of polygons making up your scene. Gustafson&#x27;s law says that doubling the data set size (or number of polygons, flops, or whatever other metric that has parallelizable computation) means you can actually get &#x27;2n&#x27; done in the same amount of time if you were to double the amount of computational performance of a system.<p>You do run into a bit harder problem today with memory bound (either size or bandwidth) applications, but there are many approaches to addressing that.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Gustafson%27s_law" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Gustafson%27s_law</a><p>Also: Here is the original 1988 paper by Gustafson... a fantastic read, and winner of the first Gordon Bell award. <a href="http:&#x2F;&#x2F;citeseerx.ist.psu.edu&#x2F;viewdoc&#x2F;summary?doi=10.1.1.85.6348" rel="nofollow">http:&#x2F;&#x2F;citeseerx.ist.psu.edu&#x2F;viewdoc&#x2F;summary?doi=10.1.1.85.6...</a>
chubot超过 9 年前
One way to ameliorate this is to write multi-threaded Python extensions -- i.e. with the threads on the C side, not the Python side.<p>You can use one core for the Python interpreter, and then 63 or 127 cores for the C&#x2F;C++ code. Python is the control plane, and C is the data plane. This is a really useful pattern, but there is not much built-in support for it.<p>It would be nice if there were Go-like channels between Python and C (i.e. to communicate between threads, instead of locking and unlocking the GIL and mutating shared data structures). And this means that you need to write&#x2F;rewrite your own extensions too. You need to factor your program differently, but I find this can make it more modular.
marcosdumay超过 9 年前
Almdahl’s law is a problem mostly restricted to scientific code and databases nowadays. Almost everybody else can just get more problems to solve in parallel, and split computing power between them. (Eg. you just run more instances of your web-server worker processes.)<p>And well, databases do not use glue code in high level languages (or at least, do not lock on it). So, outside of the scientific computing community, that&#x27;s an almost complete non-issue.
cws超过 9 年前
Loved this post. So prescient.<p>I was exposed to Amdahl&#x27;s law first through this blog post about how the concept can be leveraged for competitive advantage. Always love seeing how the technicals affect the biz side of things.<p><a href="https:&#x2F;&#x2F;www.extrahop.com&#x2F;blog&#x2F;2013&#x2F;20gbps-realtime-transaction-analysis-2&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.extrahop.com&#x2F;blog&#x2F;2013&#x2F;20gbps-realtime-transacti...</a>
mynegation超过 9 年前
So what would be the alternative for the &quot;glue code&quot; language today? From the top of my head I can think of: (1) Javascript - granted, it is single-threaded in nature but it acquired enough parts to deal with asynchronicity and communication with other processes. (2) Clojure - immutable data structure, refs, atoms and all that (3) Erlang (?)
noir_lord超过 9 年前
That was a really interesting post, I&#x27;d not really considered that as we hit the limits that the glue layer will be the bottleneck.<p>In hindsight that makes stuff like Go and Rust look doubly obvious, most of the benefits of something like Python with the down and dirty speed of a compiled language.
jaimebuelta超过 9 年前
Interestingly enough, these days I think that most people won&#x27;t consider most Python or Ruby code as &quot;glue code&quot;.
progmal1超过 9 年前
Are there benchmarks that show for simple &quot;glue code&quot; that commonly used interpreted languages are 20x slower.