HackerTube.dev

How to Speed up a Python Program 114,000 times.

InfoQ · 170.6K views · 2012-12-05 · 59:11

Open on YouTube ↗

If playback is restricted in your region, try opening the original video. Use Mark watched to add it to your marked videos.

Overview

David Schachter describes how he made a data-collection Python program run 114,000 times faster, drawing on decades of experience. The talk covers pipelining, cache effects and other optimization lessons.

On Hacker News

A favorite tech talk on HN for showing that hardware knowledge and generalist skills beat simply adding machines.

Recommended by 3 HN people across 3 months · HN mentions 2015–2022

Topics

Search by tags

What people said

anoother · 2016-10 · Strong recommendation

"How to Speed up a Python Program 114,000 times." - [VIDEO] Humour, serious technical insight and a good reminder of why being a generalist is an advantage.

Read the original HN comment ↗
lkbm · 2020-10 · Recommendation

I thought this was going to be "How to Speed up a Python Program 114,000 times"[0]. It's an hour-long talk, but quite enjoyable. In the example in the talk, it was less about knowing cs algorithms and more about knowing the details of how modern computer architecture works, but the lesson is the same: sometimes the background knowledge of a cs degree is useful. He also has the same point about optimizing our code rather than just adding more and more machines. [0] [VIDEO]

Read the original HN comment ↗
gravypod · 2016-12 · Recommendation

This will technically only work on pipelined architectures of which all major CPU architectures are one. You will be able to see a significant boost to performance given the following are all true: * You have no inter dependancy of information across the lines * All your data is in the cache * You don't have instructions generated between the two lines that will require some sort of operand forwarding Basically, if you already have the stuff in the cache, the calculation is invarent to the last calculation, and you have a processor capable of it you'll see a large speed improvement. There is a great talk about this [0] (for the exact moment go to [1]). If you're interested further I'd very much recommend finding some sort of GOOD computer architecture class. Luckily now we have a fantastic resource to locate these such courses [2]. This seems like dark magic and many programmers refuse to come to terms with it's existence. Check out `dreta`'s comment to see an example. Now I do agree with dreta, this is VERY much architecture dependant but most architectures would benifit from this sort of optimization. Pretty much all modern Intel and AMD CPU's caches are large enough, they support a big enough cache, and they also all have pipelines under the hood. Intel started this in the pentium series with a 5-stage-pipeline (which I find very funny due to the GHz wars that came from that time period desipte the pipeline being probably the pargest performance boon in most cases that you

Read the original HN comment ↗

Sources

Video by InfoQ, played through YouTube.

Data and selection notes

HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.

HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.

Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.

Selection checks
  • SaaS & AI candidates: Topic keywords do not match
  • Editor-approved picks: Editorial review is required

Rule matches identify candidates. They do not guarantee video quality or financial results.

About the library and its sources