New Python User Question about Python.
Peter Hansen
peter at engcorp.com
Thu Aug 23 03:34:55 EDT 2001
Deep0258 wrote:
>
> I am just wondering, since I am now joining python and it's greatness, why
> don't the developers of Python make Python just as fast(if not faster) than the
> older, more low-level lanquage. Yes, there are advantages using the interpreter
> style programs, but isn't there a way to incorporate the speed of compiled
> programs with the debugging and clearness of Interpreter to make Python a much
> faster lanquage. There might be a way, but I'm pretty new so I don't know. Any
> answers, thank you for listening?
Since you seem to know about interpreters versus compilers, you
probably know already that code which runs on an interpreter,
as a general rule, is significantly slower than compiled code.
Therefore I'll assume you are really just suggesting that
somebody write a compiler for Python.
This gets suggested frequently, and while there are more
thorough answers than this, in a nutshell the answer seems
to be that the dynamic nature of Python makes full compilation
an intractable problem.
An answer from a different point of view is "why bother?"
Python is already "fast enough" for many applications -- one
might even say "for most applications for which it is
used", and there is little interest in improving its
speed compared to improvements in other areas. Python
programmers tend to adopt a philosophy of making code work
rather than making code fast. Given a choice of doing
one or the other, any reasonable person would pick the former.
Since so many software projects are failures even before
they manage to release their products, if they ever do,
Python contributes greatly to improving that dismal
record even with its currents speed. So, "why bother"?
There are many things to fix in the software world
before we optimize...
--
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com
More information about the Python-list
mailing list