Release of PyPy 0.7.0
Michael Hudson
mwh at python.net
Tue Aug 30 06:00:58 EDT 2005
Michael Sparks <ms at cerenity.org> writes:
> Valentino Volonghi aka Dialtone wrote:
>
>> Michael Sparks <ms at cerenity.org> wrote:
>>
>>> Would it be useful for people to start trying out their modules/code to
>>> see if they work with this release, and whether they can likewise be
>>> translated using the C/LLVM backends, or would you say this is too early?
>>> (I'm more thinking in terms of it providing real world usecases in the
>>> hope of finding things that don't work - rather than anything else)
>>
>> This is not how it works.
>
> I beg to differ - it is how it can work (just not the default or currently
> recommended).
The chance of any random module you have written being rpython is more
or less zero, so it's not _that_ interesting for you to try to compile
them with PyPy.
> """You can also use the translate_pypy.py script to try out several smaller
> programs, e.g. a slightly changed version of Pystone:
> cd pypy/translator/goal
> python translate_pypy.py targetrpystone
> """
>
> Which is pretty cool of course. For those of interest running pystone with
> the pypy compiled native binary has the following results for pystones on
> my machine:
>
> michaels at linux:~/pypy-0.7.0/pypy/translator/goal> ./pypy-c
> debug: entry point starting
> debug: argv -> ./pypy-c
> debug: importing code
> debug: calling code.interact()
> Python 2.4.1 (pypy 0.7.0 build) on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)
>>>>> from test import pystone
>>>>> pystone.main(1000)
> Pystone(1.1) time for 1000 passes = 13.97
> This machine benchmarks at 71.582 pystones/second
>>>>>
>
> The same results for CPython:
> michaels at linux:~/pypy-0.7.0/pypy/translator/goal> python
> Python 2.4 (#1, Mar 22 2005, 21:42:42)
> [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from test import pystone
>>>> pystone.main()
> Pystone(1.1) time for 50000 passes = 1.58
> This machine benchmarks at 31645.6 pystones/second
>
> Obviously therefore anyone seeking to translate their existing code from
> python to an executable directly using pypy would not be doing it for
> performance reasons (again, something I'm aware of watching the
> updates come out and having run svn checkouts at previous times).
No, you're still operating at the wrong level here (very easily done).
This is the _translated PyPy_ interpreting pystone. If you run a
_translated pystone_ you'll (hopefully) get a different, faster
answer.
In expected order of execution speed:
interpreted pypy interpreting pystone
translated pypy interpreting pystone
cpython interpreting pystone
translated pystone
> Anyway, whether it's sensible or not I'm going to play with translating some
> of my modules :)
Whatever floats your boat :)
Cheers,
mwh
--
Ability to type on a computer terminal is no guarantee of sanity,
intelligence, or common sense.
-- Gene Spafford's Axiom #2 of Usenet
More information about the Python-list
mailing list