Python is Interpreter or Compiler based language

jskfan
jskfan used Ask the Experts™
on
Python is Interpreter or Compiler based language

I have read that Python is an Interpreter based language. Does that mean it can be slow to render the results when it is run ?

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018
Commented:
It is something of a hybrid, mostly interpreted but some Python implementations do consist of a just-in-time compiler (quote from the article below)

https://softwareengineering.stackexchange.com/questions/24558/is-python-interpreted-or-compiled
C-Python (which is at the moment the mos common implementation of python, though there are many others) can be considered an interpreted language.
You just start a python script.
It is 'compiled' on the fly into a bytecode, that is then interpreted.

Python is not a very fast language. However it is a language that allows you to achieve many things rather quickly and quite elegantly.
Very often the performamce issue is no real issue. It all depends on the context.

Many modules hat exist for Python are python bindings to libraries, that are written and compiled in C.
So Python is often 'just' there to glue together very fast sections of optimized code.

Imagine for example you write a small python script loading a jpeg file with python and the PIL module.
Though you use python byte code for your script, the actual decoding of the JPEG file is handled by libjpeg which is optimized C-code.

So in many cases you do not encounter any performance issues.

If you're worried about performance issues it would be good if you said what kind of code you wanted to write.
Chances are that the python modules you would be using are optimized bindings and you could benefit fron the easo of writing code with python and have no performance issues

Author

Commented:
Trying just to have an idea about it..
Thank you for your insights Guys!
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
You are very welcome and I was happy to help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial