Python Numbers Every Programmer Should Know

Big Python speed list drops, debate erupts over usefulness

TLDR: Michael Kennedy shared a big table of Python speed and memory stats with code on GitHub. The comments split between “useful reference” and “misleading micro‑benchmarks,” with skeptics saying complexity matters more and some claiming if you care this much, Python might not be the right tool.

Michael Kennedy dropped a giant cheat sheet of Python speed and memory: how fast adding numbers is, how quick list appends are, dict lookups, string glueing, plus how many bytes an empty string or a float hog. It’s all benchmarked on a fast Mac and CPython 3.14, with code on GitHub. Think: stopwatch times for common moves, and a scale for how heavy everyday Python objects are.

The crowd? Spicy. Some nod and bookmark, but many clap back that it’s not what “every programmer should know.” [woodruffw] warns the numbers can drift—non‑ASCII text and changing object overhead ruin neat tables. [ktpsns] says the premise oversells it. [zelphirkalt] calls it a “weird fixation” and begs for lessons on big‑picture complexity instead. Then [tgv] shrugs: “don’t fret… Python is slow,” triggering memes like “benchmarks vs vibes” and “micro‑benchmarks are comfort food.” The hottest take is [fooker]’s mic drop: if you need these numbers, you picked the wrong tool. Commenters joke that “empty string weighs 41 bytes—my New Year’s resolutions weigh less,” and argue devs should chase algorithm wins before nitpicking nanoseconds. It’s a classic internet brawl: handy reference vs real‑world messiness.

Key Points

  • Benchmarks were run on CPython 3.14.2 on a Mac Mini M4 Pro (ARM), macOS Tahoe (26.2), with 14 cores and 24 GB RAM.
  • Memory footprints are provided for common Python objects, including strings, ints, floats, lists, dicts, sets, and various class constructs.
  • Basic operation timings include arithmetic, string formatting/concatenation, and list append, with results in nanoseconds.
  • Collection operations cover lookups, membership checks, iteration, len(), and summation over 1,000 items, with microsecond-level timings.
  • Source code for the benchmarks is published on GitHub for replication and deeper review.

Hottest takes

"Great reference overall" — woodruffw
"far away from what \"every programmer should know\"" — ktpsns
"program in python only if you can get away without knowing these numbers" — fooker
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.