Add basic speedtest
Transfer some functions from sqlalchemy dumptruck