[pypy-dev] CFFI speed results

Eleytherios Stamatogiannakis estama at gmail.com
Fri Dec 14 18:25:35 CET 2012


Here is the synthetic benchmark.

To run it you'll need latest madIS. You can clone it using:

hg clone https://code.google.com/p/madis/

For running the test you can use:

CPython 2.7 + APSW:

https://code.google.com/p/apsw/

Or pypy + APSW (you'll need to clone APSW for it to build on pypy):

hg clone https://code.google.com/p/apsw/

Or pypy + MSPW. You'll find attached a "mspw.py". To use it *rename* it 
to "apsw.py" and put it in pypy's "site-packages" directory. For MSPW to 
work in pypy, you'll also need CFFI and "libsqlite3" installed.

Here i should note, that MSPW is in a extremely rough state. Our main 
focus at this time is to find out how fast we can make it go. So right 
now MSPW doesn't do much error checking. Expect segmentation faults if 
you try a query in mterm and something is wrong with the query.

To run the test with pypy/python:

pypy mterm.py < mspw_bench.sql

or

python mterm.py < mspw_bench.sql

For some reason pypy + APSW throws an exception when it finishes running 
mspw_bench, but the timings should be reliable.

The timings of "mspw_bench" that we get are:

CPython 2.7 + APSW: ~ 1.5 sec
pypy + APSW: ~ 9 sec
pypy + MSPW: ~4.5 sec

There are two ways to adjust the processing load of mspw_bench.

One is to change the value in "range(xxxxx)". This will in essence 
create a bigger/smaller "synthetic text". This puts more pressure on 
CPython's/pypy's side.

The other way is to adjust the window size of textwindow(t, xx, xx). 
This puts more pressure on the wrapper (APSW/MSPW) infrastructure 
because it changes the number of columns that CPython/pypy have to send 
to SQLite (they are send on value at a time).

Both Ioannis Foufoulas and me are available to help with the benchmark.

Many many thanks,

lefteris.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpsw.py
Type: text/x-python
Size: 65446 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20121214/fb7dcdf7/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mspw_bench.sql
Type: text/x-sql
Size: 120 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20121214/fb7dcdf7/attachment-0001.bin>


More information about the pypy-dev mailing list