Why Python is Slow Programming Language?

Kishan Tongrao
2 min readJul 3, 2021

Hello, my name is Kishan Tongrao. Today we are going to learn why Python is the slow programming language.

Photo by Alex Blăjan on Unsplash

Below are primary three reasons that make Python slow.

Global Interpreter Lock

Why does Python need GIL?

  • GIL can provide thread-safe memory management which was much required.
  • GIL also provides a performance boost to single-threaded programs.
  • The default implementation of Python ‘CPython’ uses GIL to execute exactly one thread at the same time, even if run on a multi-core processor as GIL works only on one core regardless of the number of cores present in the machine
  • It. allows only one thread to hold the control of the Python interpreter.
  • In Python3, we have fixed-time allocated for each thread, i.e., 5ms of execution time. This prevents the threads from starving for resources since the waiting time is equal for all the threads.

Interpreted and No Compiled

Dynamic Type Binding

Enjoy !

Contact

Gmail — tongs.the10@gmail.com

LinkedIn — linkedin.com/in/kishan-tongrao-6b9201112

--

--