I've been working on a PGsql helper class to speed up the hotspots in my new pgsql PostgreSQL driver; so far it works rather well, and the performance of the new driver has leaped from 10% of the libpq module, to about 45% of the libpq module.
I won't be including the module until I have it at about 100% (or greater) of the libpq speed though.