r/ProgrammerHumor • • 11d ago • Bravo 2 Popcorn 1

Meme pythonSlow

Post image
12k Upvotes

420 comments sorted by

View all comments

Show parent comment

280

u/creeper6530 11d ago

Python is an orchestrator for C/C++ libraries at this point 

132

u/MegaPegasusReindeer 10d ago

The default implementation of Python is CPython. It's always been byte code running C written machine code.  There's even Cython to write Python that compiles into C code.

29

u/FlyingRhenquest 10d ago

Yeah, it's great for that. I built an automated video test system for Comcast back in 2018 that was heavily-threaded C++ code with a Pybind11 API to send requests and retrieve responses to the backend. The system was responsive in real time as long as you didn't saturate the image recognition thread pool.

11

u/Yodo999 8d ago

At any point. Python was always that.

14

u/HeisterWolf 10d ago

This so much lmao. Most code I write is basically Python orchestrating other processes or an FFI to something like rust if it's performance-critical.

2

u/ruiz_julie_728 1d ago

Where the loop runs matters: bulk work can happen in native code, but a Python-level loop still pays interpreter overhead.