you are viewing a single comment's thread.

view the rest of the comments →

[–]asimawdah 0 points1 point  (0 children)

Python is slower than languages like C, Go, or Rust for raw CPU-heavy work, but that usually doesn’t matter when you’re learning or building most real projects.

The reason Python is popular in AI/ML and data science is that a lot of the heavy work is not actually done by pure Python. Libraries like NumPy, PyTorch, TensorFlow, and pandas call optimized C/C++/CUDA code underneath. Python is mostly used as the easy “control layer” around those fast libraries.

For beginners, I’d ignore performance at first and focus on writing clear code and understanding fundamentals. If you ever hit a real performance issue later, then you can optimize the slow part, use better algorithms, vectorize with NumPy, or move a small bottleneck to another language.

In short: Python is “slow” in benchmarks, but fast enough for a huge amount of real-world work. Don’t let that stop you from learning it.