Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pyvm -- faster python

Reply
Thread Tools

pyvm -- faster python

 
 
Stelios Xanthakis
Guest
Posts: n/a
 
      05-08-2005
Hi.

pyvm is a program which can run python 2.4 bytecode (the .pyc files).
A demo pre-release is available at:
http://students.ceid.upatras.gr/~sxanth/pyvm/


Facts about pyvm:
- It's FAST. According to the "cooked-bench" benchmark suite it finishes
in 55% of the time python takes
- It's SMALL. Currently the source code is under 15k lines with the
builtin modules.
- It's new. Uses no code from CPython.
- It's incomplete. Not even near the stability and quality of python.
It needs A LOT of work before it can be compared to CPython.
Moreover, at the time it lacks many things like closures, long numbers
new style classes, etc.
- It's incompatible with CPython. Not all programs run.
- The C API is incompatible. You can't run C modules (a thin wrapper to
make pyvm appear as libpython *could* be possible but not a goal
AFAIC)
- The demo is an x86/linux binary only. You shouldn't trust binaries,
run it in a chrooted environment not as root!

Hope it works!

Cheers,

Stelios
 
Reply With Quote
 
 
 
 
Kay Schluehr
Guest
Posts: n/a
 
      05-08-2005

Stelios Xanthakis wrote:
> Hi.
>
> pyvm is a program which can run python 2.4 bytecode (the .pyc files).
> A demo pre-release is available at:
> http://students.ceid.upatras.gr/~sxanth/pyvm/
>
>
> Facts about pyvm:
> - It's FAST. According to the "cooked-bench" benchmark suite it

finishes
> in 55% of the time python takes
> - It's SMALL. Currently the source code is under 15k lines with the
> builtin modules.
> - It's new. Uses no code from CPython.
> - It's incomplete. Not even near the stability and quality of python.
> It needs A LOT of work before it can be compared to CPython.
> Moreover, at the time it lacks many things like closures, long

numbers
> new style classes, etc.
> - It's incompatible with CPython. Not all programs run.
> - The C API is incompatible. You can't run C modules (a thin wrapper

to
> make pyvm appear as libpython *could* be possible but not a goal
> AFAIC)
> - The demo is an x86/linux binary only. You shouldn't trust binaries,
> run it in a chrooted environment not as root!
>
> Hope it works!
>
> Cheers,
>
> Stelios


Hi Stelios,

could You tell us a bit more about Your motivation to create an
alternative C-Python interpreter? There is AFAIK no such ambitious
project that has ever survived. The last one I remember died shortly
after it was born:

http://www.python.org/pycon/papers/pymite/

This is sad because it is still challenging to offer a tiny interpreter
of a dynamic language for glue code/RAD on tiny hardware. A lot of
effort was spent to provide Java for microcontrollers especially for
SmartCards. I think a lot of people would show interest in Your project
if it gets somehow focussed and does not seem to be redundant.

Ciao,
Kay

 
Reply With Quote
 
 
 
 
bearophileHUGS@lycos.com
Guest
Posts: n/a
 
      05-08-2005
I've seen the benchmarks, they look quite interesting.

This project is probably a LOT of work; maybe people can tell us about
such efforts *before* doing so much work, so we can discuss it, and
avoid wasting time.

Maybe you can explain us why it is so fast, and/or maybe you can work
with the other developers to improve the speed of the normal CPython,
this can require equal or less work for you, and it can produce more
long-lasting results/consequences for your work.

Bye,
Bearophile

 
Reply With Quote
 
Roger Binns
Guest
Posts: n/a
 
      05-08-2005
> could You tell us a bit more about Your motivation to create an
> alternative C-Python interpreter?


I'd also be curious to know if the performance gains would remain
once it gets fleshed out with things like closures, long numbers,
new style classes and a C library compatibility shim.

Roger


 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      05-08-2005
Kay Schluehr wrote:
> Stelios Xanthakis wrote:
>>pyvm is a program which can run python 2.4 bytecode (the .pyc files).
>>A demo pre-release is available at:
>> http://students.ceid.upatras.gr/~sxanth/pyvm/

>
> could You tell us a bit more about Your motivation to create an
> alternative C-Python interpreter? There is AFAIK no such ambitious
> project that has ever survived. ..


If you check the URL more closely, you'll notice that this is a
university site.

It seem likely this being done at least partly as a school project,
which is certainly motivation enough for such a thing, *even* if it
doesn't survive (since it will pay for itself in learning).

-Peter
 
Reply With Quote
 
Paul Rubin
Guest
Posts: n/a
 
      05-08-2005
Stelios Xanthakis <(E-Mail Removed)> writes:
> - The demo is an x86/linux binary only. You shouldn't trust binaries,
> run it in a chrooted environment not as root!


Are you going to release the source? If not, it's a lot less interesting.
 
Reply With Quote
 
djw
Guest
Posts: n/a
 
      05-09-2005
Paul Rubin wrote:
> Stelios Xanthakis <(E-Mail Removed)> writes:
>
>>- The demo is an x86/linux binary only. You shouldn't trust binaries,
>> run it in a chrooted environment not as root!

>
>
> Are you going to release the source? If not, it's a lot less interesting.


From the website:

"...the source will be released when it becomes more complete and stable."
 
Reply With Quote
 
Dan Christensen
Guest
Posts: n/a
 
      05-10-2005
djw <(E-Mail Removed)> writes:

> Paul Rubin wrote:
>> Stelios Xanthakis <(E-Mail Removed)> writes:
>>
>>>- The demo is an x86/linux binary only. You shouldn't trust binaries,
>>> run it in a chrooted environment not as root!

>>
>>
>> Are you going to release the source? If not, it's a lot less interesting.

>
> From the website:
>
> "...the source will be released when it becomes more complete and stable."


If he releases the source now, it'll probably become more complete and
stable sooner...

Remember, release early, release often!

Dan
 
Reply With Quote
 
Stelios Xanthakis
Guest
Posts: n/a
 
      05-10-2005
Kay Schluehr wrote:
>
> could You tell us a bit more about Your motivation to create an
> alternative C-Python interpreter? There is AFAIK no such ambitious
> project that has ever survived. The last one I remember died shortly
> after it was born:
>


The motivation is that I just needed some bytecode engine. I deciced
to go with python bytecode, because well, IMO it's the best!
Eventually it turned out what it is.

I'm afraid this may end up dead before unborn too.
So it depends what people want. If nobody cares, I just learned python
the hard way and the project does to the abandonware cemetary.


Stelios



 
Reply With Quote
 
Stelios Xanthakis
Guest
Posts: n/a
 
      05-10-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> This project is probably a LOT of work; maybe people can tell us about
> such efforts *before* doing so much work, so we can discuss it, and
> avoid wasting time.
>


It is a lot of work indeed.
Usually, when people announce "we shall create X", it doesn't happen.
And you don't know if you can do it at all *before*.


> Maybe you can explain us why it is so fast, and/or maybe you can work
> with the other developers to improve the speed of the normal CPython,
> this can require equal or less work for you, and it can produce more
> long-lasting results/consequences for your work.
>


The reason is that it's built from the scratch.
Guido would disagree with that, see py-dev thread:

http://www.mail-archive.com/python-d.../msg01225.html


There *are* alternative ways to do some things in the vm and Joel
is simply wrong
Could this be .... Python 3000!!!?


Stelios
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for pyvm Vladimir G. Ivanovic Python 0 05-24-2009 11:19 PM
I could use some help making this Python code run faster using only Python code. Python Maniac Python 24 09-23-2007 05:48 PM
pyvm source code stelios xanthakis Python 2 12-30-2005 01:53 PM
Looking for Benchmarklets to improve pyvm stelios xanthakis Python 2 04-02-2005 09:40 AM
Python is faster than C Armin Rigo Python 36 04-06-2004 04:10 PM



Advertisments