[Tutor] Slowness of Python
Manprit Singh
manpritsinghece at gmail.com
Thu Oct 15 00:57:29 EDT 2020
Dear sir ,
In this mail, I just need a reply from you. I have a question - 'Why python
is slow in comparison to other compiled languages like c or c++.
There may be several reasons. The point that is coming to my mind is -
Python is a dynamically typed language, you do not need to declare a
datatype of the variable when assigning a value to it . So at run time,
when actual execution takes place, First the datatype of the variable is
checked and then if there is any operation involved, it is also checked
that the operation is valid for that datatype or not, then the execution
takes place . So this kind of checking will take time . This causes
slowness . There is no such checking involved in the case of compiled
languages during runtime, as this process is being done at the compile time
in compiled language.
Is my point correct or incorrect ? Can you please tell me some more few
points in this regard
Regards
Manprit Singh
More information about the Tutor
mailing list