TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Two Performance Walls Approaching (2009)

31 pointsby brassybadgerover 9 years ago

8 comments

trsohmersover 9 years ago
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>
chubotover 9 years ago
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.
marcosdumayover 9 years ago
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.
cwsover 9 years ago
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>
mynegationover 9 years ago
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_lordover 9 years ago
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.
jaimebueltaover 9 years ago
Interestingly enough, these days I think that most people won&#x27;t consider most Python or Ruby code as &quot;glue code&quot;.
progmal1over 9 years ago
Are there benchmarks that show for simple &quot;glue code&quot; that commonly used interpreted languages are 20x slower.