Why is Python such a demanding language despite being very slow?

Why is Python such a demanding language despite being very slow?

Why is Python such a demanding language despite being very slow?

What makes python Slow in teams of speed?

Before diving into details of why Python is popular in the mainstream despite being slow, I will briefly explain how or why Python is slow in nature in terms of performance and speed as compared to other popular programming languages like C, C++, and Java.

  • ?Python is a high-level programming language: The code of Python looks very similar to how humans think. For that reason, it must Separate the details of the computer from you: memory management, pointers,… Hence, it is slower than “lower-level language” like C.
  • It’s interpreted and not compiled: During the execution, Python code is interpreted at runtime instead of being compiled to native code at compile time.
  • It is one of the dynamically typed languages: Unlike “statically-typed” languages like C, C++, or Java, you don’t have to declare the variable type like?String,?boolean, or?int.?
  • Global Interpreter Lock (GIL): This GIL basically prevents multithreading by mandating the interpreter only execute a single thread within a single process at a time.

Why is Python so in demand?

I would say that 9/10 times the slower performance of Python doesn’t matter. Here I will discuss some major aspects and reasons.

End-users just don’t care much:

Can you really feel the variation between 0.001 seconds or 0.01 seconds? The answer is most likely “No”. Eventually, it doesn’t matter too much to the end-users if your program takes just a little bit longer for its execution. As long as we do not write a program that executes in centuries and totally destroys end-user experience, it’s fine.?

High in Productivity:

One reason is that it is very popular because it is highly productive as compared to other programming languages like C++ and Java. It is more concise and expressive language and requires less time, effort, and lines of code to perform the same operations.

Business Speed is matters a lot rather than execution:

In the past when computer run time was to be the main and the most expensive resource. But now, things have changed. Computers, servers, and other hardware which become much cheaper than ever and speed has become a less important factor. Today, development time matters more than execution speed in terms of cost as employee time has become one of the most, and expensive resources. Decreasing the time needed for each and every project, companies save lots of money.

In short, the amount of time you can save in the development process will possibly be more cost-effective than whatever performance and execution speed in the application you get.

As a CEO, which option will you choose??

(1) complete a project in 6 months?

(2) complete the same project in 4 months but you have to pay 20% more for the server.?

If execution speed is the only concern, then (1) is your choice. But if your focus is more on development speed and faster innovation, (2) should be your choice.

That’s where Python gains more popularity as the time required to build a program using Python is very short as compared to other programming languages.

Is Speed the only factor a programmer should consider?

When choosing any kind of programming language to develop any type of application, there are several tens or hundreds of factors that you should consider, and speed is surely one of them. But, there are other things that also matter like language suitability and Scalability.

Citta Solutions?is one of the most advanced ERP Systems across the globe. We have expertise in providing all kinds of business Consultancy, IT services & Outsourcing Services.

Karabo Maila

Software Developer | BSc Computer Science graduate

1 年

Great article.

回复

要查看或添加评论,请登录

Citta的更多文章

社区洞察

其他会员也浏览了