pydata/pandas — pull request #8102 by jorisvandenbossche (2014-08-23 11:07:57+00:00)
Title: BENCH: add benchmarks for SQL

xref #6701, #6416

WIP for now: intitial benchmarks for sql functions

* Where should the benches be placed? Because there is `io_bench.py`, `packers.py` and `parsers_vb.py` which all contain io related benchmarks. Or should I create a new file?
* The first tests are a generic mixed-type frame writing/reading, both with sqlalchemy (sqlite) and sqlite fallback
* I am going to add seperate benches for different types (float, string, datetime)
* other important things to test?

First run with `./test_perf.sh -b master -t HEAD -r sql` gives:

```
-------------------------------------------------------------------------------
Test name | head[ms] | base[ms] | ratio |
-------------------------------------------------------------------------------
sql_write_fallback | 218.5094 | 219.5977 | 0.9950 |
sql_write_sqlalchemy | 347.1383 | 347.9416 | 0.9977 |
sql_read_query_fallback | 28.5973 | 28.6067 | 0.9997 |
sql_read_table_sqlalchemy | 39.0046 | 38.9366 | 1.0017 |
sql_read_query_fallback | 35.9294 | 35.4296 | 1.0141 |
-------------------------------------------------------------------------------
Test name | head[ms] | base[ms] | ratio |
-------------------------------------------------------------------------------

Ratio < 1.0 means the target commit is faster then the baseline.
Seed used: 1234

Target [3bcc9c2] : BENCH: add benchmarks for SQL
Base [86ecb99] : BUG: fix iat and at for Float64Index
```

You can see that the sqlalchemy version is somewhat slower than the fallback version.