PorkyThePaladin
Arcane
- Joined
- Dec 17, 2013
- Messages
- 5,415
Python performance issues are completely overblown here. It is a relatively slow language compared to others, but what these people won't tell you (for you young programmers out there):
1. For many real world applications, performance doesn't matter that much. For example, any kind of scripts, automation, tools, scientific programs, etc generally are not real-time, meaning if they have to run for some time, it's not a big deal. If you are running an automated script for some office process for example, it doesn't matter if it runs for 3 minutes or 15 minutes in most cases, because it will be running in the background.
2. Modern hardware is extremely powerful, with CPUs being able to do something on the order of billions of operations per second. Meaning a benchmark test that shows that C++ is 40 times as fast as Python is meaningless in most real world applications, because a C++ program will finish in let's say 0.01 seconds, and a Python program finishing 40 times later, will finish in 0.4 seconds. Do you think anyone will notice the difference in the real world?
3. Most real world slowness in programs comes not from the programming language but from other sources: IO, DB connections, Internet, or badly written code. These things will generally dwarf whatever performance differences there are between languages.
The stuff above might not apply to everything, I wouldn't use Python for truly fast code, e.g. 3D games or operating systems or those financial programs that need to submit transactions in fractions of a second or a website that serves tens of millions of hits daily, but for the vast majority of real world applications, Python speed is not a big issue.
1. For many real world applications, performance doesn't matter that much. For example, any kind of scripts, automation, tools, scientific programs, etc generally are not real-time, meaning if they have to run for some time, it's not a big deal. If you are running an automated script for some office process for example, it doesn't matter if it runs for 3 minutes or 15 minutes in most cases, because it will be running in the background.
2. Modern hardware is extremely powerful, with CPUs being able to do something on the order of billions of operations per second. Meaning a benchmark test that shows that C++ is 40 times as fast as Python is meaningless in most real world applications, because a C++ program will finish in let's say 0.01 seconds, and a Python program finishing 40 times later, will finish in 0.4 seconds. Do you think anyone will notice the difference in the real world?
3. Most real world slowness in programs comes not from the programming language but from other sources: IO, DB connections, Internet, or badly written code. These things will generally dwarf whatever performance differences there are between languages.
The stuff above might not apply to everything, I wouldn't use Python for truly fast code, e.g. 3D games or operating systems or those financial programs that need to submit transactions in fractions of a second or a website that serves tens of millions of hits daily, but for the vast majority of real world applications, Python speed is not a big issue.