Grahame Bowland | 3 Mar 2009 15:05
Gravatar

Benchmarking storm

Hi all

I've just done some benchmarking of Storm, as I've found it a little
bit slow while iterating over a large number of result rows from a
query. Attached is a Python program "bench.py" which has equivalent
benchmarks for Storm, Django, and two other tests using the sqlite3
module directly.

The test is very simple - 100,000 rows of data in an sqlite3 database
are iterated over. Nothing is done with the results. Aside from Django
and Storm I benchmark two trivial cases; just iterating over rows from
a sqlite3 module cursor, and iterating over those rows and creating an
trivial object from the result.

Here are the results:

$ time ./bench.py test.db bench_raw
./bench.py test.db bench_raw  0.12s user 0.02s system 98% cpu 0.145 total
$ time ./bench.py test.db bench_raw_obj
./bench.py test.db bench_raw_obj  0.24s user 0.02s system 98% cpu 0.263 total
$ time ./bench.py test.db bench_django
./bench.py test.db bench_django  2.04s user 0.11s system 98% cpu 2.189 total
$ time STORM_CEXTENSIONS=0 ./bench.py test.db bench_storm
STORM_CEXTENSIONS=0 ./bench.py test.db bench_storm  13.87s user 0.08s
system 99% cpu 14.000 total
$ time STORM_CEXTENSIONS=1 ./bench.py test.db bench_storm
STORM_CEXTENSIONS=1 ./bench.py test.db bench_storm  11.44s user 0.10s
system 99% cpu 11.640 total

You can see that Storm is quite a bit slower than the competition,
(Continue reading)


Gmane