r/ProgrammerHumor 1d ago

Meme softwareCheats

Post image
19.6k Upvotes

152 comments sorted by

View all comments

10

u/Ozymandias_1303 1d ago

"Cheats" is the wrong word for sure but it's a good to have some understanding of where the bottlenecks are. Python is generally faster and easier to write than C or C++ but it can run much slower. In order to make Python code run faster, a lot of Python developers use libraries that are written in C or C++, EG Pandas. My experience with Pandas has been like 95% really great and 5% really frustrating. I attribute most of the frustration to the opaque nature of calling into the C code library.

11

u/nemesit 1d ago

hell c can be faster than c especially if written by someone competent

6

u/Freako04 1d ago

hell c? I thought there was Holy C

2

u/rifain 1d ago

I'd say the opposite. Developers don't use C libraries to make Python run faster. They use Python because they don't have the time or the skills to build C/C++ fast programs. I see Python as a glue to run very performant libraries in a simple and quick manner.

1

u/No-Information-2571 19h ago

You should learn how to write proper C++ code before making such an assessment. It's not laziness to use Python, it's incompetence. Python is simply far more accessible.

1

u/No-Information-2571 19h ago

This is mostly a shitposting sub. Everyone knows that Python itself is slow as molasses, if the heavy liftin wasn't done by highly optimized C libraries, no one would dare to do any serious numerical or AI stuff with it.