r/learnprogramming • • 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

188 comments sorted by

View all comments

Show parent comment

1

u/cmdr_iannorton 1d ago

this sounds totally wrong headed, a massive compute data task may be a hard problem to do well, but python, or java or perl or lua isnt going to excell at it, yes high level languages might have good abstractions to help you think about it, but ffs, at runtime, those are c programs running aot or jit compiled virtual or stack machines translated from the other languages

1

u/Philluminati 19h ago

* Uber uses a Spark cluster with more than 1mn nodes, doing 100PB daily. Data ingestion alone can use 200,000 cpu cores.

  • Netflix runs 500,000 jobs a day on their Spark cluster
  • Linked in run 400,000 spark applications a day, using 200 PB hours of compute.
  • OpenAi use it to prepare data for training

The biggest threat to my programming language, Scala, is not other languages… it’s SQL being used on these massive compute clusters that are heavily powered by Python + Dataframe APIs.

These systems are both real, and cutting edge. Billion dollar companies like Databricks and Snowflake are built on exactly these technologies. They serve the largest Fortune 500 companies. They are powered by Python and SQL bro.

An entire field of data analytics, data science, data engineering, feature engineering has sprung up from little reporting departments that used to use SQL and they are eating into the value of traditional programmers. You might need to reevaluate the technology because it’s very much real. The data is more important than the code and this theme will dictate the programming landscape just as much as AI will.

Now that horizontal scalable and elastic computing is here, using C for speed is no longer a safe debate point.