r/learnprogramming • u/Happy-GoLucky365 • 6d ago
Why is C++ better than Python?
Hello! I am new to programming. Im in college and we use Python for my classes right now.
I hear people make a lot of jokes about how C++ is more powerful than Python, and should be used instead. But why?
Feel free to give me any tips as well, on things that helped you be a better programmer, or just any insight you may have! Thanks so much
76
Upvotes
View all comments
Show parent comment
1
u/binarycow 6d ago
As with everything, it depends.
If your app processes real-time data like a phone call, it's super important. Because if you take too long, you've already missed stuff
If your app is a tool that runs once a day, to trigger a backup job (but doesn't perform the backup itself), then it matters absolutely zero.
The app I work on has some stuff where you wouldn't normally think it's a big deal, but because of our use case, it does.
For example, there was a thing that took 10 minutes total. I made one change (caching regexes) that made it take 5 minutes total. That's great - but what makes it even better is that was just my local small scale test. Our customers are running that same task, but 100 times bigger. So their ~16 hour task shrunk to ~8 hours. That's a huge savings.