frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Python: The Optimization Ladder

https://cemrehancavdar.com/2026/03/10/optimization-ladder/
55•Twirrim•3d ago

Comments

Ralfp•1h ago

    CPython 3.13 went further with an experimental copy-and-patch JIT compiler -- a lightweight JIT that stitches together pre-compiled machine code templates instead of generating code from scratch. It's not a full optimizing JIT like V8's TurboFan or a tracing JIT like PyPy's;
Good news. Python 3.15 adapts Pypy tracing approach to JIT and there are real performance gains now:

https://github.com/python/cpython/issues/139109

https://doesjitgobrrr.com/?goals=5,10

josalhor•1h ago
While this is great, I expected faster CPython to eventually culminate into what YJIT for Ruby is. I'm not sure the current approaches they are trying will get the ecosystem there.
seanwilson•1h ago
> The real story is that Python is designed to be maximally dynamic -- you can monkey-patch methods at runtime, replace builtins, change a class's inheritance chain while instances exist -- and that design makes it fundamentally hard to optimize. ...

> 4 bytes of number, 24 bytes of machinery to support dynamism. a + b means: dereference two heap pointers, look up type slots, dispatch to int.__add__, allocate a new PyObject for the result (unless it hits the small-integer cache), update reference counts.

Would Python be a lot less useful without being maximally dynamic everywhere? Are there domains/frameworks/packages that benefit from this where this is a good trade-off?

I can't think of cases in strong statically typed languages where I've wanted something like monkey patching, and when I see monkey patching elsewhere there's often some reasonable alternative or it only needs to be used very rarely.

LtWorf•46m ago
I've used a library that patches the zipfile module to add support for zstd compression in zipfiles.

In python3.14 the support is there, but 2 years ago you could just import this library and it would just work normally.

__mharrison__•57m ago
Great writeup.

I've been in the pandas (and now polars world) for the past 15 years. Staying in the sandbox gets most folks good enough performance. (That's why Python is the language of data science and ML).

I generally teach my clients to reach for numba first. Potentially lots of bang for little buck.

One overlooked area in the article is running on GPUs. Some numpy and pandas (and polars) code can get a big speedup by using GPUs (same code with import change).

kelvinjps10•48m ago
Great post saved it for when I need to optimize my python code
rusakov-field•44m ago
Python is perfect as a "glue" language. "Inner Loops" that have to run efficiently is not where it shines, and I would write them in C or C++ and patch them with Python for access to the huge library base.

This is the "two language problem" ( I would like to hear from people who extensively used Julia by the way, which claims to solve this problem, does it really ?)

retsibsi•22m ago
A personal opinion: I would much prefer to read the rough, human version of this article than this AI-polished version. I'm interested in the content and the author clearly put thought and effort into it, but I'm constantly thrown out of it by the LLM smell. (I'm also a bit mad that `--` is now on the em dash treadmill and will soon be unusable.)

I'm not just saying this to vent. I honestly wonder if we could eventually move to a norm where people publish two versions of their writing and allow the reader to choose between them. Even when the original is just a set of notes, I would personally choose to make my own way through them.

arlattimore•7m ago
What a great article!

1M context is now generally available for Opus 4.6 and Sonnet 4.6

https://claude.com/blog/1m-context-ga
889•meetpateltech•21h ago•344 comments

XML Is a Cheap DSL

https://unplannedobsolescence.com/blog/xml-cheap-dsl/
121•y1n0•2h ago•86 comments

Baochip-1x: What It Is, Why I'm Doing It Now and How It Came About

https://www.crowdsupply.com/baochip/dabao/updates/what-it-is-why-im-doing-it-now-and-how-it-came-...
120•timhh•2d ago•17 comments

Python: The Optimization Ladder

https://cemrehancavdar.com/2026/03/10/optimization-ladder/
58•Twirrim•3d ago•9 comments

Megadev: A Development Kit for the Sega Mega Drive and Mega CD Hardware

https://github.com/drojaazu/megadev
55•XzetaU8•5h ago•0 comments

Wired headphone sales are exploding

https://www.bbc.com/future/article/20260310-wired-headphones-are-better-than-bluetooth
241•billybuckwheat•2d ago•410 comments

Mothers Defense (YC X26) Is Hiring in Austin

https://jobs.ashbyhq.com/9-mothers?utm_source=x8pZ4B3P3Q
1•ukd1•59m ago

The Isolation Trap: Erlang

https://causality.blog/essays/the-isolation-trap/
94•enz•2d ago•30 comments

Show HN: Channel Surfer – Watch YouTube like it’s cable TV

https://channelsurfer.tv
550•kilroy123•3d ago•161 comments

Michael Faraday: Scientist and Nonconformist (1996)

http://silas.psfc.mit.edu/Faraday/
25•o4c•3d ago•2 comments

RAM kits are now sold with one fake RAM stick alongside a real one

https://www.tomshardware.com/pc-components/ram/fake-ram-bundled-with-real-ram-to-create-a-perform...
84•edward•4h ago•69 comments

Mouser: An open source alternative to Logi-Plus mouse software

https://github.com/TomBadash/MouseControl
359•avionics-guy•20h ago•111 comments

Hammerspoon

https://github.com/Hammerspoon/hammerspoon
308•tosh•20h ago•116 comments

Philosoph Jürgen Habermas Gestorben

https://www.spiegel.de/kultur/philosoph-juergen-habermas-mit-96-jahren-gestorben-a-8be73ac7-e722-...
16•sebastian_z•35m ago•1 comments

A Survival Guide to a PhD (2016)

http://karpathy.github.io/2016/09/07/phd/
137•vismit2000•4d ago•84 comments

Digg is gone again

https://digg.com/
262•hammerbrostime•19h ago•260 comments

Can I run AI locally?

https://www.canirun.ai/
1297•ricardbejarano•1d ago•320 comments

Recursive Problems Benefit from Recursive Solutions

https://jnkr.tech/blog/recursive-benefits-recursive
34•luispa•3d ago•16 comments

I found 39 Algolia admin keys exposed across open source documentation sites

https://benzimmermann.dev/blog/algolia-docsearch-admin-keys
140•kernelrocks•15h ago•41 comments

Nominal Types in WebAssembly

https://wingolog.org/archives/2026/03/10/nominal-types-in-webassembly
4•ingve•4d ago•0 comments

You gotta think outside the hypercube

https://lcamtuf.substack.com/p/you-gotta-think-outside-the-hypercube
88•surprisetalk•4d ago•23 comments

Secure Secrets Management for Cursor Cloud Agents

https://infisical.com/blog/secure-secrets-management-for-cursor-cloud-agents
23•vmatsiiako•4d ago•4 comments

Atari 2600 BASIC Programming (2015)

https://huguesjohnson.com/programming/atari-2600-basic/
40•mondobe•2d ago•9 comments

I beg you to follow Crocker's Rules, even if you will be rude to me

https://lr0.org/blog/p/crocker/
98•ghd_•15h ago•150 comments

Please Do Not A/B Test My Workflow

https://backnotprop.com/blog/do-not-ab-test-my-workflow/
128•ramoz•2h ago•143 comments

Games with loot boxes to get minimum 16 age rating across Europe

https://www.bbc.com/news/articles/cge84xqjg5lo
250•gostsamo•14h ago•158 comments

Starlink Militarization and Its Impact on Global Strategic Stability

https://interpret.csis.org/translations/starlink-militarization-and-its-impact-on-global-strategi...
7•msuniverse2026•5h ago•1 comments

Coding after coders: The end of computer programming as we know it?

https://www.nytimes.com/2026/03/12/magazine/ai-coding-programming-jobs-claude-chatgpt.html?smid=u...
162•angst•2d ago•239 comments

AEP (API Design Standard and Tooling Ecosystem)

https://aep.dev/
24•rambleraptor•3d ago•8 comments

Qatar helium shutdown puts chip supply chain on a two-week clock

https://www.tomshardware.com/tech-industry/qatar-helium-shutdown-puts-chip-supply-chain-on-a-two-...
645•johnbarron•1d ago•561 comments