[Tutor] Slowness of Python

dn PyTutor at DancesWithMice.info
Thu Oct 15 01:03:35 EDT 2020


On 15/10/2020 17:57, Manprit Singh wrote:
> 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

Less to do with data and typing, more to do with being an interpreted-, 
cf a compiled-language.

https://duckduckgo.com/?q=why+is+python+slow

-- 
Regards =dn


More information about the Tutor mailing list