Newbie: "compiling" scrips (?)

Steve Holden sholden at holdenweb.com
Thu Jun 26 08:09:17 EDT 2003


"Alan Kennedy" <alanmk at hotmail.com> wrote in message
news:3EF9CBD8.F3AFF856 at hotmail.com...
> Gerrit Holl wrote:
>
> > I don't understand how pypy can improve performance. Am I correct that
pypy
> > is an effort to implement Python as much as possible in Python?
>
> Yes, that's a part of what the PyPy people are doing.
>
> > And am I
> > correct that implementing a module in C will probably speed it up?
>
> In some scenarios, implementing a module in C will speed things up, but it
is
> not guaranteed. It depends on the data being transferred back and forth
between
> the C extension and the users python script. This transfer comes at a
cost. If
> the cost of the transfer outweighs the time spent in the C extension, then
it
> will be slower. Which doesn't happen very often, mind.
>
> > Combining
> > these two, wouldn't implementing Python in Python slow things down?
>
> Not necessarily. That's true only if you assume that the python virtual
machine
> interpreting the python byte codes doesn't run any faster than the current
> Python VM.
>
> > If so,
> > what is the advantage of pypy?
>
> From my readings, I think the PyPy project is very ambitious (and I wish
them
> the very best of luck getting funding for it).
>
[and lots of other good stuff]

Alan: thanks very much, couldn't have explained that as well myself!

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/







More information about the Python-list mailing list