In article <mailman.270.1257970526.2873.python-l...@python.org>,
Terry Reedy  <tjre...@udel.edu> wrote:
>
>I can imagine a day when code compiled from Python is routinely 
>time-competitive with hand-written C.

I can't.  Too much about the language is dynamic.  The untyped variables
alone are a killer.

        int a,b,c;
        ...
        a = b + c;

In C, this compiles down to just a few machine instructions.  In Python,
the values in the variables need to be examined *at run time* to determine
how to add them or if they can even be added at all.  You'll never in
a million years get that down to just two or three machine cycles.

Yes, technically, the speed of a language depends on its implementation,
but the nature of the language constrains what you can do in an
implementation.  Python the language is inherently slower than C the
language, no matter how much effort you put into the implementation.  This
is generally true for all languages without strongly typed variables.

-- 
        -Ed Falk, f...@despams.r.us.com
        http://thespamdiaries.blogspot.com/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to