r/ProgrammerHumor • • 4d ago

Meme pythonSlow

Post image
10k Upvotes

409 comments sorted by

View all comments

Show parent comment

9

u/Acceptable-Pin2939 4d ago

The slow points are almost never the code execution but other things like io / http / other overheads.

Why is why python is used.

1

u/g3etwqb-uh8yaw07k 4d ago

Also, I found some stuff on yt where a guy actually had to put in quite a lot of effort to make some math stuff run faster in C/C++ (not sure which one anymore) because python just used really optimised C libraries in the background. Not an expert and this is only anecdotal, but I think worth mentioning here, too.

2

u/adeptus_chronus 4d ago

3

u/g3etwqb-uh8yaw07k 4d ago

probably. I think I watched that channel in the past and it fits the topic. I just can't remember exactly and don't wanna spend half an hour trying to find the exact video

2

u/Andrei95 2d ago

Exactly. For math stuff, there's probably a algorithm written and optimized by some PhD back in the 80s that's probably more efficient than anything the majority of people could come up with. And if there isn't njit makes Python pretty dang fast for a lot of use cases.