![](https://secure.gravatar.com/avatar/34074d36919afb11d5ed1b8e330a1e68.jpg?s=120&d=mm&r=g)
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.